主题编辑器
左侧调整主题配置,下方组件实时跟随。面板即真实的 SThemeCustomizer:颜色、圆角、尺寸、间距、字体、表面、描边与逐 token 覆盖都会即时作用于当前页面。
品牌色
primary、由中性基调派生的填充,以及角色色阶
- 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
状态色
feedback 方案:destructive、success、warning、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
表单控件
细线 token、控件填充与焦点环
- 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
数据展示
表面、弱化填充与表格描边
- 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.
表面与阴影
层次阶梯、嵌套的 card / popover 表面与 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 —— 这一档已经是下限。
描边与焦点
细线 token、焦点环与模态遮罩
- 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.
浮层
对话框与弹层所在的 popover 表面,以及遮罩
- popover
- mask
- border
- shadow-md
- z-base
SDialog · SDrawer · SSheet · SDropdownMenu · SPopover · STooltip · SPopconfirm
Popup surface tokens
尺寸
控件与文字档位共用的 size 刻度
- 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
- 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
间距
一个变量驱动内外边距与 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
字体
三套字族角色:无衬线、标题与等宽 stack
- 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
区域 · 侧栏
镜像全局角色的区域皮肤
- 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
图表色
由 primary 派生的 chart-1 至 chart-5
- chart-1
- chart-2
- chart-3
- chart-4
- chart-5
Grouped bars
Stacked bar · legend
对比度
填充与其前景的配对一览
- *-foreground
- *-hairline
Solid fills — SButton on every role
Fill ↔ foreground pairs — every fill with its declared text