You must first invent the universe

Typography is a core building block of every web application.

This goes with a semantics-first approach, because header hierarchy and text nesting have implications on accessibility. The visual style can be configured through props.

Elements

Type.H1

Type.H2

Type.H3

Type.H4

Type.H5

Type.H6

Type.Text

Type.Inline

Specifying size

size

example

h100

The quick brown fox jumps over the lazy dog

h200

The quick brown fox jumps over the lazy dog

h300

The quick brown fox jumps over the lazy dog

h400

The quick brown fox jumps over the lazy dog

h500

The quick brown fox jumps over the lazy dog

h600

The quick brown fox jumps over the lazy dog

h700

The quick brown fox jumps over the lazy dog

h800

The quick brown fox jumps over the lazy dog

Styling text

style

example

light

The quick brown fox jumps over the lazy dog

semibold

The quick brown fox jumps over the lazy dog

regular

The quick brown fox jumps over the lazy dog

bold

The quick brown fox jumps over the lazy dog

Use Type.Inline to style text inline. It inherits the parent font size by default, so you don't have to repeat the size prop. You can still opt to override the font size.

Lorem ipsum dolor sit sit amet consectetur, adipisicing elit.

Specifying spacing

Use props to set margin and paddings.

prop

description

m

vertical and horizontal margins

mt

top margin

mb

bottom margin

ml

left margin

mr

right margin

mx

vertical margins

my

horizontal margins
With margin and padding

The quick brown fox jumps over the lazy dog

With top margin and bottom padding

The quick brown fox jumps over the lazy dog

With vertical margin

The quick brown fox jumps over the lazy dog

With horizontal margin

The quick brown fox jumps over the lazy dog