Skip to content

Typography

Elevate’s typography system offers a flexible and consistent way to manage text sizes across your application. It defines a set of font sizes tailored for various use cases, from subtle footnotes to bold, prominent headings.


How It Works

The font sizes are defined in elevate/core/system/etc/typography.ts as part of the size property:

export const typography = {
size: {
tiny: '0.533rem',
small: '0.711rem',
base: '1rem',
h6: '1.125rem',
h5: '1.5rem',
h4: '2.25rem',
h3: '3.375rem',
h2: '5.062rem',
h1: '7.594rem',
eyebrow: '0.583rem'
}
};

Font Sizes

NameDescriptionValueExample
tinySmallest size for subtle or legal text.0.533rem

Aa

eyebrowDecorative text for overlines or tags.0.583rem

Aa

smallSlightly larger text for captions.0.711rem

Aa

baseStandard body text size.1rem

Aa

h6Smallest heading size.1.125rem

Aa

h5Slightly larger heading for subsections.1.5rem

Aa

h4Medium headings for section titles.2.25rem

Aa

h3Large headings for standout content.3.375rem

Aa

h2Extra-large headings for important areas.5.062rem

Aa

h1Largest size for main titles.7.594rem

Aa

Simplified, Hierarchical Text Styling

The font sizes in Elevate help create:

  1. Clear Text Hierarchy: Sizes are designed to visually guide the reader.
  2. Readability: Well-balanced text scales ensure optimal legibility across devices.
  3. Clean Markup: Developers can use size tokens directly without the need for additional styling.

For example:

<div class="font:h1:sans text:red+1:blog">Welcome to Elevate</div>
<p class="font:base:loose text:indigo">This is the body text styled with the base size.</p>
<div class="font:tiny text:grey">Disclaimer: Tiny text for subtle information.</div>

This approach ensures a consistent and readable typography system.