Skip to content
Components

Styling & composition

Use the same styling foundation across your own primitives and the ready-made library. Keep layout close to the component and customize only what you need.

Start with style props

INTERACTIVE EXAMPLE

Loading preview…

Resolve tokens through ThemeProvider. Numeric spacing values represent pixels on web and native layout units on React Native.

Choose a built-in variant

Before overriding internal styles, check the component's variant, size, and other documented props.

INTERACTIVE EXAMPLE

Loading preview…

Variant names differ between components. Use each component's TypeScript props and examples rather than assuming every control accepts the same names.

Customize internal views

views exposes named internal parts. Button exposes container, content, and icon and loader parts. The available names are component-specific.

INTERACTIVE EXAMPLE

Loading preview…

Preserve labels, focus indicators, disabled behavior, and hit areas when overriding views.

Interaction states on the web

Primitives support state styles such as _hover, _active, and _focus. Use a semantic interactive element and keep keyboard focus visible.

INTERACTIVE EXAMPLE

Loading preview…

Browser selectors and pseudo-elements are web-only. On native, use supported platform events and accessibility behavior. See platform differences.

Compose ordinary React components

Extract a component when layout or behavior repeats. A single visual adjustment can stay as props at the call site. Configure theme tokens before copying raw colors across your app.

The framework styling reference documents more states and selectors.

Browse documentation source