Skip to main content

Styles and themes

Use semantic tokens that remain readable in different environments.

Before you start: Style a screen.

Native semantic roles include accent / on-accent, card / card-foreground, and muted-foreground. Native primary is a text-color role. Components defines separate rc-* roles under ui:Theme, including filled rc-primary / rc-primary-foreground.

Style one panel​

Use the appearance menu to inspect both themes. Override paired foreground/background roles deliberately.

<Column class="p-4 bg-background">
<Column class="p-4 gap-2 bg-card rounded-xl border border-border">
<Text text="A quiet place to read" class="font-headline text-card-foreground" />
<Text text="Padding, color, and shape are utilities." class="text-muted-foreground" />
</Column>
</Column>
Style one panel
editable
Browser preview
rReady to explore
Environment & events

Browser rendering of the shared document. Host services are bundled demo mocks. XML edits reset local state; data edits preserve compatible state.

Interact with the preview to inspect emitted events and mocked service calls.

Try it: Switch to dark, then increase padding. Check that labels remain readable.

Relo validates a finite grammar. Control-state variants such as pressed: have their own precedence and cannot change layout. Theme reference, variants, and style utilities describe the contract.