Skip to content
Theme UI
GitHub

Text

Primitive typographic component.

import { Text } from 'theme-ui'

Variants

Text style variants can be defined in the theme.text object. The Text component uses theme.text.default as its default variant style.

// example theme variants
{
text: {
default: {
color: 'text',
fontSize: 3,
},
caps: {
textTransform: 'uppercase',
letterSpacing: '0.2em',
},
heading: {
fontFamily: 'heading',
fontWeight: 'heading',
lineHeight: 'heading',
},
}
}
Edit the page on GitHub
Previous:
Switch
Next:
Textarea