Typography
The typography components are semantic HTML wrappers that ship with sensible
defaults for every level of headings and body text. They’re designed to be
composed and styled with Tailwind utility classes via className or via the
shared typography theme.
Components
H1– page titleH2– primary section headingH3– sub-section headingH4– small headingH5– tertiary headingH6– smallest headingP– paragraph / body textLead– emphasized intro paragraphLarge– emphasized inline textSmall– de-emphasized inline textMuted– muted helper textBlockQuote– block quotation
Quick Start
To start using the typography components, import them from reablocks.
Welcome
Build beautiful interfaces with reablocks.
Last updated today.
Examples
Headings
Paragraphs
Lead
Large, Small, and Muted
BlockQuote
Everything together
Customizing with className
The old color, variant, fontStyle, and disableMargins props were
removed in 10.0.0. Apply Tailwind utilities directly via className, or
override the shared theme to change defaults globally.
import { H1, P } from 'reablocks';
<H1 className="text-primary tracking-tight">Title</H1>
<P className="font-bold italic">Bold italic body</P>Theme
Typography uses a per-element theme. Every key maps to a single string of Tailwind classes that’s applied to that semantic element.
- root{}(12 keys)
- Show all
interface TypographyTheme {
h1: string;
h2: string;
h3: string;
h4: string;
h5: string;
h6: string;
p: string;
blockquote: string;
lead: string;
large: string;
small: string;
muted: string;
}Learn more about how to customize in the Theme documentation.
API
H1
H2
H3
H4
H5
H6
P
Lead
Large
Small
Muted
BlockQuote
Migrating from 9.x
| Before | After |
|---|---|
PageTitle | H1 |
PrimaryHeading | H2 |
SecondaryHeading | H3 |
SmallHeading | H4 |
Sub | H5 |
<Text> | P, Small, or Muted |
<Text fontStyle="bold"> | <P className="font-bold" /> |
<Text color="primary"> | <P className="text-primary" /> |
<Text variant="mono"> | <P className="font-mono" /> |
See the full guide in Migration.