Skip to main content
On this page

Typography

Fonts, scales and styles for typographic elements.

Overview​

Typography groups together font size, weight, family and line heights.

Responsive font sizes are array values that correspond to the responsive breakpoints. The first value will be used below the smallAndUp breakpoint, the second value will be used for all other screen sizes.

Line Height​

Line height is a ratio, set per type style so headings, body text and small text can each be tuned independently. Text that isn't one of these named styles uses standard.

Theme tokens
TokenDefault Value
lineHeights.standard1.3
lineHeights.small1.3
lineHeights.body1.3
lineHeights.level11.3
lineHeights.level21.3
lineHeights.level31.3
lineHeights.level41.3

Weight​

Aa
Aa
Aa
Theme tokens
TokenDefault Value
fontWeights.normal400
fontWeights.medium500
fontWeights.bold700
fontWeights.semiBold600

Fonts​

Nebula uses the open source Aspekta font family for headings and display text, and the Inter font family, available from Google Fonts, for body text. If Aspekta is not present, Inter is used as the fallback.

Display
Body
Monospace
Theme tokens
TokenDefault Value
fonts.display"Aspekta", Inter, sans-serif
fonts.body"Inter", sans-serif
fonts.monospaceCourier

Font Sizes​

Font sizes are paired for responsive scaling. Each token has an array of corresponding values. As a general rule, the small screen size is usually one step down the scale. e.g. body on small screen is equivalent to small on screen sizes above small.

Level 1
Level 2
Level 3
Level 4
Body
Small
Level 1
Level 2
Level 3
Level 4
Body
Small

The scale is also available under fontSizes, but the recommendation is to use responsiveFontSizes to get the responsive pairings.

Theme tokens
TokenDefault Value
responsiveFontSizes.small.01.0rem
responsiveFontSizes.small.11.2rem
responsiveFontSizes.body.01.2rem
responsiveFontSizes.body.11.4rem
responsiveFontSizes.level1.02.4rem
responsiveFontSizes.level1.12.8rem
responsiveFontSizes.level2.02.0rem
responsiveFontSizes.level2.12.4rem
responsiveFontSizes.level3.01.6rem
responsiveFontSizes.level3.12.0rem
responsiveFontSizes.level4.01.4rem
responsiveFontSizes.level4.11.6rem