Native Solid 2 fork. Original documentation and designs © WorkOS; historical posts retain their original context.
Typography
Base components
Use Text and Heading components to render titles and body copy. These components share size and weight props and map to the underlying type system to ensure consistent typography throughout your app.
Typographic principles
The goal of typography is to relate font size, line height, and line width in a proportional way that maximizes beauty and makes reading easier and more pleasant.Formatting components
Compose formatting components to add emphasis, signal importance, present code and more.
Type scale
The typographic system is based on a 9-step size scale. Every step has a corresponding font size, line height and letter spacing value which are all designed to be used in combination.
Font weight
The following weights are supported. Weights can be customized to map to your own typeface.
Font family
By default, Radix Themes uses a system font stack for portability and legibility. Continue to the next section to learn about customizing your theme with a custom font.
Customization
Radix Themes typography can be customized by overriding the corresponding CSS variables of the token system. Refer to the source code for the full list of the typographic tokens.
Make sure that your CSS is applied after the Radix Themes styles so that it takes precedence.
Custom fonts
You can provide your own fonts, however, how you choose to import and serve them is up to you. It is only required that you specify your named fonts using the correct syntax.
To customize the font family used in your theme, remap the corresponding font-family tokens:
Loading fonts with CSS
Use a stylesheet or @font-face; no React or Next.js font loader is needed. For example, load Inter from Google Fonts in your application's global stylesheet:
Finally, assign the CSS variable in your custom CSS:
Import your font stylesheet before local token overrides. See common styling issues for CSS import-order guidance.
Custom font weights
To customize the exact font weights used in your theme, remap the corresponding font-weight tokens to your own values:
Advanced settings
There’s a number of advanced typographic features that can be customized. These include a font size multiplier for certain components, font style, letter spacing, and leading trim. For example, you can customize the headings to render with a relatively larger font size than your default font, different leading trim values, and tighter letter spacing: