Skip the navigation

Typography

Typography tokens help keep visual consistency for text formatting across themes.

These tokens (in the form of CSS classes) should be applied to any text appearing in the app. This allows for easy text formatting changes in the future as well as consistent cross app / brand formatting.

Web developers have two options to apply Typography Tokens:

  • Use Typography components Display, Heading, and Body. (These are no different from manually applying CSS classes, it's just a component that applies the same CSS classes with other convenient helper functionality)
  • Use Typography CSS Classes. These are tied to each theme, and each theme might have different typography definitions for the classes. An example of a CSS class would be .display-3xl-bold.

Your Figma specs will reference which typography token to use when inspecting text. In figma it might be represented as body/xl, or heading/sm. Replace the / character with a - character for the CSS class.

// Display component example:
<Display size="xl-bold">This would be text formatted by .display-xl-bold</Display>
// or you can apply the CSS Class to your own element
<div className="display-xl-bold">This text would be formatted the same as above.</div>

Body

SizeClassNameExample
xl.body-xlBe a Caesar!
xl-bold.body-xl-boldBe a Caesar!
lg.body-lgBe a Caesar!
lg-bold.body-lg-boldBe a Caesar!
md.body-mdBe a Caesar!
md-bold.body-md-boldBe a Caesar!
sm.body-smBe a Caesar!
sm-bold.body-sm-boldBe a Caesar!
xs.body-xsBe a Caesar!
xs-bold.body-xs-boldBe a Caesar!

Heading

SizeClassNameExample
2xl.heading-2xlBe a Caesar!
2xl-bold.heading-2xl-boldBe a Caesar!
xl.heading-xlBe a Caesar!
xl-bold.heading-xl-boldBe a Caesar!
lg.heading-lgBe a Caesar!
lg-bold.heading-lg-boldBe a Caesar!
md.heading-mdBe a Caesar!
md-bold.heading-md-boldBe a Caesar!
sm.heading-smBe a Caesar!
sm-bold.heading-sm-boldBe a Caesar!
xs.heading-xsBe a Caesar!
xs-bold.heading-xs-boldBe a Caesar!

Display

SizeClassNameExample
3xl.display-3xlBe a Caesar!
3xl-bold.display-3xl-boldBe a Caesar!
2xl.display-2xlBe a Caesar!
2xl-bold.display-2xl-boldBe a Caesar!
xl.display-xlBe a Caesar!
xl-bold.display-xl-boldBe a Caesar!
lg.display-lgBe a Caesar!
lg-bold.display-lg-boldBe a Caesar!
md.display-mdBe a Caesar!
md-bold.display-md-boldBe a Caesar!
sm.display-smBe a Caesar!
sm-bold.display-sm-boldBe a Caesar!
xs.display-xsBe a Caesar!
xs-bold.display-xs-boldBe a Caesar!