Colors and opacity
Supported colors and opacity utilities.
Quick reference
| Syntax | Behavior |
|---|---|
bg-TOKEN | Background role. |
text-TOKEN | Foreground role. |
border-TOKEN | Border color role. |
opacity-N | 0–100 percent opacity, integer suffix. |
Example
<Text text="A highlighted message" class="p-3 bg-accent text-on-accent opacity-100" />
Rules and validation
Native roles include primary, secondary, disabled, background, surface, accent, on-accent, danger, on-danger, surface-disabled, separator, foreground, muted, muted-foreground, card, card-foreground, border, input, ring, accent-foreground, primary-foreground, secondary-foreground, destructive, destructive-foreground, success, on-success, and warning. ui:Theme supplies separate rc-* tokens. Native primary retains its text-color meaning. There is no arbitrary CSS color syntax.