Typography
Size, weight and line spacing help the user quickly scan the page and find the desired action. For the same semantic levels, use the same design.
Text hierarchy
The page has one main heading. Section headings explain the structure, the main text reveals the content, and the auxiliary text clarifies the details. Don't accidentally replace headings with larger fonts: keep the HTML levels h1-h6.
In the standard theme, the base text size is 14 px. Dimensions and lineHeight are set by theme design tokens; for headers and states use Typography.
Font and metrics
Check the font size along with line height, hyphens and padding. Align fields and buttons with a container, for example Flex or Space, taking into account their sizes.
The system font stack depends on the user's environment. If your product requires additional scripts or a custom font, include the appropriate files and check the availability of the characters.
Readability
Limit the line length of long text, separate paragraphs, and do not hide important information only behind ellipsis. The full value must remain available. For your elements read fontFamily, fontSize, lineHeight and colorText from topics.
Font family
A system font stack provides familiar reading across platforms. Check Cyrillic, Latin, Chinese and mixed-script text. Tabular figures are useful for numerical columns: equal digit widths support comparison without changing content.
Base size and scale
Ant Design’s base system pairs 14 px text with a 22 px line height. A scale defines related heading and text sizes. A work interface usually needs only a few levels; additional steps should express a real role rather than fill out the available scale.
The table shows the default theme values. Changing fontSize recalculates the scale.
| Role | Size, px | Line height, px | Tokens |
|---|---|---|---|
| Supporting text | 12 | 20 | fontSizeSM / lineHeightSM |
| Body text | 14 | 22 | fontSize / lineHeight |
| Large text / heading 5 | 16 | 24 | fontSizeLG / lineHeightLG |
| Heading 4 | 20 | 28 | fontSizeHeading4 / lineHeightHeading4 |
| Heading 3 | 24 | 32 | fontSizeHeading3 / lineHeightHeading3 |
| Heading 2 | 30 | 38 | fontSizeHeading2 / lineHeightHeading2 |
| Heading 1 | 38 | 46 | fontSizeHeading1 / lineHeightHeading1 |
Weight and role
Regular and medium weights cover much of a work interface. Reserve stronger emphasis for meaningful hierarchy. Check the actual font in each language: the same font-weight value can produce different visual weight in different fonts.
Reading in context
Coordinate primary, secondary and disabled text with the surface colour. Check contrast, text scaling, long headings and overflow. Typography demonstrates headings, paragraphs, copying and truncation.
Adapted from the guide by Ant Design. MIT.