Typography

The Typography component provides a reusable pattern for typography in the interface.

Variant

In this case, variant is set to h1 and element parameter is left untouched. This results in a <p> element that looks like h5 element.

Variant h1

Element

When the parameter element is set and the variant element is not, the result is a p element that looks like a <h1> element.

Element h1

Heading Variants

Standard HTML heading levels from h1 to h6. These are semantic elements that define the document structure and hierarchy.

Variant: h1

Variant: h2

Variant: h3

Variant: h4

Variant: h5
Variant: h6

Display Variants

Large display text variants including headline, title, and subtitle. These are used for prominent text that needs visual emphasis.

Variant: headline
Variant: title
Variant: subtitle

Body Text Variants

Standard body text variants including body, paragraph (p), and bold. These are the primary text styles for content.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec suscipit auctor dui, a efficitur ligula. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec suscipit auctor dui, a efficitur ligula. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec suscipit auctor dui, a efficitur ligula. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec suscipit auctor dui, a efficitur ligula. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.

Small Text Variants

Smaller text variants including caption, byline, and meta. These are used for secondary information and annotations.

Variant: caption
Variant: meta

Specialized Variants

Specialized text variants for specific use cases such as marketing and email content.

Variant: marketing

API

Parameter Default Description
p What element the markup will use.
false Headings (h1, h2...) can only be set to other headings. If left empty it will default to the given element.
The content
false Upgrade element to h1 (from h3 and above), if seen first on page.
true If a heading should be based off of the context its in.

CSS API

Variable Default Type Values Description
var(--font-family-base) font - Body Font
var(--font-family-heading) font - Falls back to body font if not set.
var(--font-weight-normal) select 100, 200, 300, 400, 500, 600 Normal Weight
var(--font-weight-medium) select 400, 500, 600, 700 Medium Weight
var(--font-weight-bold) select 600, 700, 800, 900 Bold Weight
var(--font-weight-heading) select 400, 500, 600, 700, 800, 900 Heading Weight
var(--line-height-base) range - Body Line Height
var(--line-height-heading) range - Heading Line Height
var(--letter-spacing-base) range - Letter Spacing
var(--base-font-size) select 16px, 18px Root font size. All typographic sizes derive from this.
var(--space) range - Base spacing unit. Used for padding and margin inside components.
var(--font-size-scale-ratio) select 1.067, 1.125, 1.200, 1.250, 1.333 Multiplier that generates all font sizes from the base.
var(--font-size-90) range - One step below base in the type scale.
var(--font-size-200) range - One step above base in the type scale. Equivalent to h6/subtitle.
var(--font-size-300) range - Two steps above base in the type scale. Equivalent to h5.
var(--font-size-400) range - Three steps above base in the type scale. Equivalent to h4.
var(--font-size-500) range - Four steps above base in the type scale. Equivalent to h3.
var(--font-size-600) range - Five steps above base in the type scale. Equivalent to h2.
var(--font-size-700) range - Six steps above base in the type scale. Equivalent to h1.
var(--font-size-800) range - Seven steps above base in the type scale. Larger than h1.