Skip to content

Typography

Typography is for applying style to runs of text.

  • The font-family has been changed to InterVariable. See self-hosting fonts.
  • The typography scale has been adjusted to better align with StrataKit’s more compact visual language.
  • The default variant is now "body2" instead of "body1".
  • A warning will be logged during development if a heading variant is used without explicitly setting the render prop.

Heading variants of the Typography will render the respective <h1> to <h6> heading elements. You should use the render prop to override the rendered element and maintain proper heading structure in your application. When the render prop is not set, StrataKit will log a warning during development.

All of the stock MUI Typography variants are available, with sizing adjusted to fit StrataKit’s more compact visual language.

  • Use the variant prop of the Typography component to affect the visual presentation of the text.
  • Use the render prop to set the most semantically appropriate element. This is especially important for heading variants.
  • Don’t use Typography to disrupt or flatten the visual hierarchy.
  • Don’t render a heading element when you simply want to grab attention.