字体排版

完整的字体比例 - 从大标题 (64px) 到标题 2 (11px) 的 13 种样式,每种样式有四种粗细,在 Inter 中设置并按 1:1 映射到 Figma 文本样式。

系统如何运作

每一种风格都是一个 复合设计变量:一类,例如 text-body-medium 将字体大小、行高、字母间距和粗细设置在一起,定义在 styles/typography.css。你们永远不会结合 text-sm 与 font-medium 和 leading-5 手动 - 单个令牌保证 Figma 文本样式指定的精确指标。

命名是 text-{family}-{weight} - 13 个系列 × 4 个粗细(常规 400、中号 500、半粗体 600、粗体 700)。颜色与语义文本变量分开应用,因此典型的标签为 text-body-medium text-text-secondary:一类用于指标,一类用于颜色。

因为这些班级住在 text-* 命名空间,它们注册到 cx() (我们的顺风合并包装器)作为字体大小实用程序 - 否则与颜色类的合并会默默地删除它们。如果您添加或重命名样式,请将其镜像到 utils/cx.ts.

大标题

64px / 80px

Hero numerals and marketing-scale headings.

The five boxing wizards jump quickly.

text-large-title-regularRegular · 400

The five boxing wizards jump quickly.

text-large-title-mediumMedium · 500

The five boxing wizards jump quickly.

text-large-title-semiboldSemibold · 600

The five boxing wizards jump quickly.

text-large-title-boldBold · 700

显示1

56px / 72px

Full-page hero headings.

The five boxing wizards jump quickly.

text-display-1-regularRegular · 400

The five boxing wizards jump quickly.

text-display-1-mediumMedium · 500

The five boxing wizards jump quickly.

text-display-1-semiboldSemibold · 600

The five boxing wizards jump quickly.

text-display-1-boldBold · 700

显示2

48px / 64px

Large section heroes.

The five boxing wizards jump quickly.

text-display-2-regularRegular · 400

The five boxing wizards jump quickly.

text-display-2-mediumMedium · 500

The five boxing wizards jump quickly.

text-display-2-semiboldSemibold · 600

The five boxing wizards jump quickly.

text-display-2-boldBold · 700

显示3

40px / 54px

Prominent stats and page heroes.

The five boxing wizards jump quickly.

text-display-3-regularRegular · 400

The five boxing wizards jump quickly.

text-display-3-mediumMedium · 500

The five boxing wizards jump quickly.

text-display-3-semiboldSemibold · 600

The five boxing wizards jump quickly.

text-display-3-boldBold · 700

显示4

32px / 44px

Page titles; the largest style used inside the app shell.

The five boxing wizards jump quickly.

text-display-4-regularRegular · 400

The five boxing wizards jump quickly.

text-display-4-mediumMedium · 500

The five boxing wizards jump quickly.

text-display-4-semiboldSemibold · 600

The five boxing wizards jump quickly.

text-display-4-boldBold · 700

标题 1

24px / 34px

Card headline figures (step totals, earnings).

The five boxing wizards jump quickly.

text-title-1-regularRegular · 400

The five boxing wizards jump quickly.

text-title-1-mediumMedium · 500

The five boxing wizards jump quickly.

text-title-1-semiboldSemibold · 600

The five boxing wizards jump quickly.

text-title-1-boldBold · 700

标题 2

20px / 26px

Section headings inside pages and panels.

The five boxing wizards jump quickly.

text-title-2-regularRegular · 400

The five boxing wizards jump quickly.

text-title-2-mediumMedium · 500

The five boxing wizards jump quickly.

text-title-2-semiboldSemibold · 600

The five boxing wizards jump quickly.

text-title-2-boldBold · 700

标题 3

18px / 24–26px

Sub-section headings, calendar month titles.

The five boxing wizards jump quickly.

text-title-3-regularRegular · 400

The five boxing wizards jump quickly.

text-title-3-mediumMedium · 500

The five boxing wizards jump quickly.

text-title-3-semiboldSemibold · 600

The five boxing wizards jump quickly.

text-title-3-boldBold · 700

标题

16px / 22px

Emphasized body copy and lead paragraphs.

The five boxing wizards jump quickly.

text-headline-regularRegular · 400

The five boxing wizards jump quickly.

text-headline-mediumMedium · 500

The five boxing wizards jump quickly.

text-headline-semiboldSemibold · 600

The five boxing wizards jump quickly.

text-headline-boldBold · 700

身体

14px / 20px

The default UI text: labels, table cells, nav items.

The five boxing wizards jump quickly.

text-body-regularRegular · 400

The five boxing wizards jump quickly.

text-body-mediumMedium · 500

The five boxing wizards jump quickly.

text-body-semiboldSemibold · 600

The five boxing wizards jump quickly.

text-body-boldBold · 700

身体2

13px / 18px

Dense contexts: compact tables, secondary descriptions.

The five boxing wizards jump quickly.

text-body-2-regularRegular · 400

The five boxing wizards jump quickly.

text-body-2-mediumMedium · 500

The five boxing wizards jump quickly.

text-body-2-semiboldSemibold · 600

The five boxing wizards jump quickly.

text-body-2-boldBold · 700

说明文字 1

12px / 16px · tracking 0.15px

Axis labels, unit suffixes, timestamps.

The five boxing wizards jump quickly.

text-caption-1-regularRegular · 400

The five boxing wizards jump quickly.

text-caption-1-mediumMedium · 500

The five boxing wizards jump quickly.

text-caption-1-semiboldSemibold · 600

The five boxing wizards jump quickly.

text-caption-1-boldBold · 700

说明文字2

11px / 15px · tracking 0.2px

The smallest legible annotations (badges, fine print).

The five boxing wizards jump quickly.

text-caption-2-regularRegular · 400

The five boxing wizards jump quickly.

text-caption-2-mediumMedium · 500

The five boxing wizards jump quickly.

text-caption-2-semiboldSemibold · 600

The five boxing wizards jump quickly.

text-caption-2-boldBold · 700