Font Tokens
字号 Token 系统,定义了不同层级的文字大小、行高和字重,提供清晰的信息层级和一致的视觉体验。
基础用法
Tip
点击卡片可复制 token 名称
text-3xlMedium
600示例文本 The quick brown fox
Font Size30px
Line Height38px
点击复制
text-2xlMedium
600示例文本 The quick brown fox
Font Size24px
Line Height32px
点击复制
text-xlMedium
600示例文本 The quick brown fox
Font Size20px
Line Height28px
点击复制
text-lgMedium
600示例文本 The quick brown fox
Font Size18px
Line Height26px
点击复制
text-base-mMedium
600示例文本 The quick brown fox
Font Size16px
Line Height24px
点击复制
text-baseRegular
400示例文本 The quick brown fox
Font Size16px
Line Height24px
点击复制
text-sm-mMedium
600示例文本 The quick brown fox
Font Size14px
Line Height22px
点击复制
text-smRegular
400示例文本 The quick brown fox
Font Size14px
Line Height22px
点击复制
text-xsRegular
400示例文本 The quick brown fox
Font Size12px
Line Height20px
点击复制
设计规范
字号层级
系统提供 9 个字号层级,从 text-xs (12px) 到 text-3xl (30px),满足各种使用场景:
字重系统
- Medium (600):用于标题和需要强调的文本
- Regular (400):用于正文和常规文本
使用建议
- 标题层级:根据内容重要性选择合适的标题层级
- 字重搭配:同尺寸下使用不同字重来区分强调程度
- 行高设置:确保良好的阅读体验,避免行高过小导致文字拥挤
- 响应式考虑:在小屏幕设备上适当减小字号