Theme editor
Tune the theme on the left and every component below follows. The panel is the real SThemeCustomizer — colors, radius, size, spacing, fonts, surfaces, borders and the per-token overrides apply to this page as you change them.
Brand color
primary, the fills derived from the base palette, and the role ramp
- primary
- primary-foreground
- primary-50…950
- ring
- secondary
- accent
- carbon
SButton
SButton · SLink · SBadge · STag
SSwitch · SCheckbox · SSlider · SProgress · SRating · SPagination · SAvatar
primary-50 → primary-950
Status colors
the feedback scheme: destructive, success, warning and info
- destructive
- success
- warning
- info
- -foreground
SAlert
destructive
Feedback scheme role
success
Feedback scheme role
warning
Feedback scheme role
info
Feedback scheme role
SBadge · STag · SProgress
toast · SPopconfirm
destructive · destructive-foreground
Form controls
hairline tokens, control fills and the focus ring
- input
- border
- ring
- muted
- secondary
- accent
SInput · SSelect · STextarea · SInputNumber
SCheckbox · SRadioGroup · SSwitch · SRating · SSlider
SSegment · SToggleGroup · STagsInput · SCheckboxGroup
Focus ring · disabled — press Tab to walk the ring token
Data display
surfaces, muted fills and table borders
- card
- popover
- muted
- accent
- border
- muted-foreground
Card title
Surface, border, radius and shadow tokens
| Invoice | Status | Amount |
|---|---|---|
| INV-001 | Paid | $250.00 |
| INV-002 | Pending | $150.00 |
| INV-003 | Paid | $350.00 |
| INV-004 | Refunded | $450.00 |
No data
Empty state icons and copy follow the text ladder.
Surfaces & shadows
the elevation ladder, nested card / popover surfaces and surfaceStyle
- background
- card
- popover
- card-foreground
- popover-foreground
- carbon
- shadow-md
- surfaceStyle
Elevation ladder — background → card → popover → carbon
Nesting — a surface inside a surface
Surface panel
Shadow ladder
Text roles on the page surface
--foreground — the quick brown fox
--muted-foreground — the quick brown fox
次级文字再压一层不透明度就掉到 3.55:1,低于 AA 的 4.5:1 —— 这一档已经是下限。
Borders & focus
hairline tokens, the focus ring and the modal mask
- border
- input
- ring
- border-alpha
- borderOpacity
Hairline tokens
Control outlines — SInput · SSelect · STextarea
SCheckbox · SRadioGroup · SSwitch · STag
SSeparator
Card border
Card outlines read the same hairline tokens
Horizontal and vertical separators
Focus rings
Border opacity and ring width are global: the hairline tiles above are the same token at different alpha.
Overlays
dialogs and popups on the popover surface, plus the mask
- popover
- mask
- border
- shadow-md
- z-base
SDialog · SDrawer · SSheet · SDropdownMenu · SPopover · STooltip · SPopconfirm
Popup surface tokens
Size
the ladder every control and text rung reads
- size
- text-4xs…9xl
SButton · SBadge · STag
SInput · SSelect · STextarea · SInputNumber
SCheckbox · SSwitch · SSlider · SRadioGroup · SSegment
SProgress · SAvatar
Type rungs — 4xs / 3xs / 2xs (ours) then xs → 9xl (UnoCSS)
text-4xs
text-3xs
text-2xs
text-xs
text-sm
text-base
text-lg
text-xl
text-2xl
Radius
one seed drives the whole rung ladder
- radius
- radius-2xs…2xl
- radius-none
- radius-full
Rung ladder — every rung is a multiple of --radius
SButton · SInput · STag · STextarea at five rungs
Nesting — inner radius derived from the outer panel
Card
Card and controls inside it share the seed
Spacing
one unit drives padding, margin and gap
- spacing-unit
- spacing-3xs…9xl
- p-4
- gap-md
Padding ladder — the inner block is fixed, the frame moves
Gap ladder — SButtonGroup · SToolbar · SKbd
SButtonGroup · SToolbar · SSeparator
SAlert stack · SCard padding
Stacked alert
space-y-2 between rows
Stacked alert
space-y-2 between rows
Card
Cards pad their body with the same grid
Font
the three typography roles: sans, heading and mono stacks
- font-sans
- font-heading
- font-mono
Live stacks — read from `--font-*` on `:root`
ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serifui-serif, Georgia, Cambria, "Times New Roman", Times, serifui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospaceui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-seriffont-sans — body & controls
Body copy
The sans stack drives paragraphs, labels and form chrome
font-heading — titles
Section heading
Headings and display text use --font-heading
font-serif — serif copy
Long-form reading
Prose that opts into the serif stack reads --font-serif
font-mono — code & tokens
Inline code
Code, kbd and token chips read --font-mono
Region — sidebar
the region skin, mirroring the global roles
- sidebar
- sidebar-foreground
- sidebar-accent
- sidebar-accent-foreground
- sidebar-border
- sidebar-primary
- sidebar-primary-foreground
- sidebar-ring
SLayout · STreeMenu — the region skin in place
Region tokens — the sidebar mirrors the global roles
Chart colors
chart-1 to chart-5, derived from primary
- chart-1
- chart-2
- chart-3
- chart-4
- chart-5
Grouped bars
Stacked bar · legend
Contrast
the fill to foreground pairs, side by side
- *-foreground
- *-hairline
Solid fills — SButton on every role
Fill ↔ foreground pairs — every fill with its declared text