Skip to main content

Type-Safe by Default

Full TypeScript inference without manual typing or as const

Context Propagation

Variants automatically flow from parent to child components

Compound Components

Build complex components with the slots pattern

Universal

Same API for React Web and React Native

The Problem

When building UI components, you often need child elements to match their parent’s style. A button’s text should match the button’s size. A card’s header should match the card’s variant. The typical solution? Prop drilling.
This gets tedious. And error-prone.

The Solution

With better-styled, you define the relationship once. Children inherit automatically.
Both Button.Icon and Button.Label know they should render as size="lg" and variant="primary". No repetition needed.

Quick Example

Now use it:
The label automatically gets size="lg" from the parent. Clean and maintainable.

Why better-styled?

Next Steps

Installation

Get started in under a minute

Quickstart

Build your first component

React Native

Using with Expo and React Native

TypeScript

Get the most out of type inference