2.0 alpha
These docs describe 2.0. Install it with @once-ui-system/core@alpha.
On 1.8.x? Read the 1.x docs
TrademarkTrademarkDocs
Ctrl k
Search docs...
Basics

Typography

Updated: July 27, 2026
Once UI manages typography properties with the Text and Heading components. They apply utility classes and CSS variables under the hood. See the Config page for our recommended font setup. Add font-family classes to elements.
Class
Variable
Default
.font-displayvar(--font-heading)var(--font-primary)
.font-headingvar(--font-heading)var(--font-primary)
.font-bodyvar(--font-body)var(--font-primary)
.font-labelvar(--font-label)var(--font-primary)
.font-codevar(--font-code)var(--font-code)
Add font-size classes to elements. The value adjusts to the adjacent or closest parent font-family class.
Class
Variable
.font-size-inherit
.font-xldynamic
.font-ldynamic
.font-mdynamic
.font-sdynamic
.font-xsdynamic
Add font-weight classes to elements. The value adjusts to the adjacent or closest parent font-family class.
Class
Variable
.font-weight-inherit
.font-defaultdynamic
.font-bolddynamic
.font-bolderdynamic
.font-strongdynamic
Learn about setting color properties in the color documentation. Modify the font-size of the HTML element for different breakpoints.
Variable
Default
var(--font-scaling-desktop)16px
var(--font-scaling-tablet)16px
var(--font-scaling-mobile)16px
Modify the font-size scaling factor individually for different font-family classes.
Variable
Default
var(--font-size-heading-multiplier)1
var(--font-size-body-multiplier)1
var(--font-size-label-multiplier)1
Modify the line-height scaling factor individually for different font-family classes.
Variable
Default
var(--line-height-heading-multiplier)1
var(--line-height-body-multiplier)1
var(--line-height-label-multiplier)1
Edit this page on GitHub
TrademarkTrademark
Built with curiosity by Lorant One and the Design Engineers Club