Foundations
Typography
字阶、字重、字体族与中文最小字号
字阶
| 档位 | 字号 | 用途 |
|---|---|---|
text-3xs | 10px | 徽标内数字、图表轴、纯 Latin 元数据 |
text-2xs | 11px | badge、辅助标签、密集元数据 |
text-xs | 12px | 中文最小正文/标签 |
text-sm | 14px | 默认正文 |
text-md | 15px | 列表标题档(自定义) |
text-base | 16px | 强调正文 |
text-lg | 18px | 小标题 |
text-xl | 20px | 分区标题 |
text-2xl | 24px | 页面标题上限 |
中文正文与动作文案不得低于
text-xs;text-3xs/text-2xs仅用于数字、图表轴、纯 Latin 元数据。
排印层级
标题与正文使用语义档;默认值与上表逐值等价,迁移不改变视觉:
| Token | 字号 / 行高 | 对应旧档 | 用途 |
|---|---|---|---|
text-heading-1 | 24 / 32px | text-2xl | 页面主标题 |
text-heading-2 | 20 / 28px | text-xl | 分区标题 |
text-heading-3 | 18 / 28px | text-lg | 卡片/弹窗标题 |
text-heading-4 | 16 / 24px | text-base | 小标题 |
text-heading-5 | 14 / 20px | text-sm | 列表标题 |
text-heading-6 | 12 / 16px | text-xs | 密集标题 |
text-body | 14 / 24px | text-sm | 正文 |
text-label | 12 / 16px | text-xs | 表单标签 |
text-caption | 11 / 16px | text-2xs | 辅助说明 |
- 标题同时加
font-heading;消费方设置--font-user-heading即可分离标题字体。 tracking-heading是标题字距档(-0.01em),按需叠加,不强制。
字重
只允许三档:font-normal / font-medium / font-semibold。
字体族
| Token | 默认 |
|---|---|
font-sans | Inter + 思源黑体/Noto Sans SC 回落 |
font-mono | JetBrains Mono + Noto Sans SC 回落 |
font-heading | 默认继承 sans;可用 --font-user-heading 分离 |
:root {
--font-user-sans: 'Inter Variable';
--font-user-mono: 'JetBrains Mono Variable';
--font-user-heading: 'Inter Display';
}字体由消费方自装(fontsource),禁 CDN。
行高
只允许语义档:leading-none / tight / snug / normal / relaxed / loose;数值档被 lint:spacing 封禁。
数字
KPI / 表格数字使用 font-mono tabular-nums;不要用比例数字。