Skip to main content

Style a screen

Give one panel padding, color, and rounded corners.

Before you start: Arrange a screen.

Classes describe presentation. p-4 adds padding; rounded-xl sets the corner radius. Colors such as card are semantic theme roles rather than hard-coded RGB values. Relo validates its own utility vocabulary; it does not run CSS.

Add padding, color, and shape​

The outer bg-background frames a white bg-card panel in light mode and a raised zinc panel in dark mode. Its text uses the matching foreground role. The preview appearance menu lets you compare light and dark.

<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: Change p-4 to p-6, then rounded-xl to rounded-none. Check both appearances.

Next: display data. Use the style reference to find supported utility families.