- Components
- Accordion
- Alert Dialog
- Alert
- Aspect Ratio
- Avatar
- Backgrounds
- Badge
- Breadcrumb
- Button
- Calendar
- Card
- Carousel
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Dialog
- Diamond
- Drawer
- Dropdown Menu
- Hero
- Hover Card
- Input OTP
- Input
- Kbd
- Label
- Menubar
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll-area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Switch
- Table
- Tabs
- Textarea
- Toggle Group
- Toggle
- Tooltip
- Typography
Typography
Styles for headings, paragraphs, lists...etc
This page is an example of how you can use utility classes to style your text.
The Hidden Valley Discovery
After three days of hiking through dense forest, Maya finally reached the ridge overlooking the mysterious valley that had appeared on no map she'd ever seen.
The Ancient Trail
The weathered stone markers led deeper into the wilderness, each one carved with symbols that seemed to tell a story. Local legends spoke of a civilization that vanished centuries ago, leaving only traces for those bold enough to seek them.
"The mountains keep their secrets well, but they reward those who listen to the whispers carried by the wind through the pines."
Essential Gear
Maya had learned from previous expeditions that success in the wilderness depended on careful preparation. Her pack contained:
- Waterproof shelter and sleeping system rated for mountain weather
- Navigation tools including compass, GPS, and detailed topographic maps
- Emergency supplies with extra food, water purification, and first aid
Each item had been tested on countless adventures. In the backcountry, reliability wasn't just convenience—it was survival. The weight of every ounce mattered when facing steep ascents and unpredictable conditions.
Weather Observations
Time of Day | Conditions |
---|---|
Dawn | Misty valleys, clear peaks |
Midday | Bright sun, building clouds |
Evening | Golden light, gentle breeze |
As the sun set behind the distant peaks, Maya realized that the real treasure wasn't the destination, but the journey itself and the stories it would give her to share around future campfires.
import {
TypographyBlockquote,
TypographyH1,
TypographyH2,
TypographyH3,
TypographyList,
TypographyP,
TypographyTable,
} from "@/components/ui/typography"
export function TypographyDemo() {
return (
<div>
<TypographyH1>The Hidden Valley Discovery</TypographyH1>
<TypographyP>
After three days of hiking through dense forest, Maya finally reached
the ridge overlooking the mysterious valley that had appeared on no map
she'd ever seen.
</TypographyP>
<TypographyH2 className="mt-10 transition-colors">
The Ancient Trail
</TypographyH2>
<TypographyP>
The weathered stone markers led deeper into the wilderness, each one
carved with symbols that seemed to{" "}
<a
href="#"
className="text-primary font-medium underline underline-offset-4"
>
tell a story
</a>
. Local legends spoke of a civilization that vanished centuries ago,
leaving only traces for those bold enough to seek them.
</TypographyP>
<TypographyBlockquote>
"The mountains keep their secrets well, but they reward those who
listen to the whispers carried by the wind through the pines."
</TypographyBlockquote>
<TypographyH3 className="mt-8">Essential Gear</TypographyH3>
<TypographyP>
Maya had learned from previous expeditions that success in the
wilderness depended on careful preparation. Her pack contained:
</TypographyP>
<TypographyList>
<li>
Waterproof shelter and sleeping system rated for mountain weather
</li>
<li>
Navigation tools including compass, GPS, and detailed topographic maps
</li>
<li>
Emergency supplies with extra food, water purification, and first aid
</li>
</TypographyList>
<TypographyP>
Each item had been tested on countless adventures. In the backcountry,
reliability wasn't just convenience—it was survival. The weight of
every ounce mattered when facing steep ascents and unpredictable
conditions.
</TypographyP>
<TypographyH3 className="mt-8">Weather Observations</TypographyH3>
<TypographyTable>
<thead>
<tr className="even:bg-muted m-0 border-t p-0">
<th className="border px-4 py-2 text-left font-bold [&[align=center]]:text-center [&[align=right]]:text-right">
Time of Day
</th>
<th className="border px-4 py-2 text-left font-bold [&[align=center]]:text-center [&[align=right]]:text-right">
Conditions
</th>
</tr>
</thead>
<tbody>
<tr className="even:bg-muted m-0 border-t p-0">
<td className="border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right">
Dawn
</td>
<td className="border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right">
Misty valleys, clear peaks
</td>
</tr>
<tr className="even:bg-muted m-0 border-t p-0">
<td className="border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right">
Midday
</td>
<td className="border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right">
Bright sun, building clouds
</td>
</tr>
<tr className="even:bg-muted m-0 border-t p-0">
<td className="border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right">
Evening
</td>
<td className="border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right">
Golden light, gentle breeze
</td>
</tr>
</tbody>
</TypographyTable>
<TypographyP>
As the sun set behind the distant peaks, Maya realized that the real
treasure wasn't the destination, but the journey itself and the
stories it would give her to share around future campfires.
</TypographyP>
</div>
)
}
h1
Taxing Laughter: The Joke Tax Chronicles
export function TypographyH1() {
return <h1>Taxing Laughter: The Joke Tax Chronicles</h1>
}
h2
The People of the Kingdom
export function TypographyH2() {
return <h2>The People of the Kingdom</h2>
}
h3
The Joke Tax
export function TypographyH3() {
return (
<h3 className="scroll-m-20 text-2xl font-semibold tracking-tight">
The Joke Tax
</h3>
)
}
h4
People stopped telling jokes
export function TypographyH4() {
return (
<h4 className="scroll-m-20 text-xl font-semibold tracking-tight">
People stopped telling jokes
</h4>
)
}
p
The king, seeing how much happier his subjects were, realized the error of his ways and repealed the joke tax.
export function TypographyP() {
return (
<p className="leading-7 [&:not(:first-child)]:mt-6">
The king, seeing how much happier his subjects were, realized the error of
his ways and repealed the joke tax.
</p>
)
}
blockquote
"After all," he said, "everyone enjoys a good joke, so it's only fair that they should pay for the privilege."
export function TypographyBlockquote() {
return (
<blockquote className="mt-6 border-l-2 pl-6 italic">
"After all," he said, "everyone enjoys a good joke, so
it's only fair that they should pay for the privilege."
</blockquote>
)
}
table
King's Treasury | People's happiness |
---|---|
Empty | Overflowing |
Modest | Satisfied |
Full | Ecstatic |
export function TypographyTable() {
return (
<div className="my-6 w-full overflow-y-auto">
<table className="w-full">
<thead>
<tr className="even:bg-muted m-0 border-t p-0">
<th className="border px-4 py-2 text-left font-bold [&[align=center]]:text-center [&[align=right]]:text-right">
King's Treasury
</th>
<th className="border px-4 py-2 text-left font-bold [&[align=center]]:text-center [&[align=right]]:text-right">
People's happiness
</th>
</tr>
</thead>
<tbody>
<tr className="even:bg-muted m-0 border-t p-0">
<td className="border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right">
Empty
</td>
<td className="border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right">
Overflowing
</td>
</tr>
<tr className="even:bg-muted m-0 border-t p-0">
<td className="border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right">
Modest
</td>
<td className="border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right">
Satisfied
</td>
</tr>
<tr className="even:bg-muted m-0 border-t p-0">
<td className="border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right">
Full
</td>
<td className="border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right">
Ecstatic
</td>
</tr>
</tbody>
</table>
</div>
)
}
list
- 1st level of puns: 5 gold coins
- 2nd level of jokes: 10 gold coins
- 3rd level of one-liners : 20 gold coins
export function TypographyList() {
return (
<ul className="my-6 ml-6 list-disc [&>li]:mt-2">
<li>1st level of puns: 5 gold coins</li>
<li>2nd level of jokes: 10 gold coins</li>
<li>3rd level of one-liners : 20 gold coins</li>
</ul>
)
}
Inline code
@radix-ui/react-alert-dialog
export function TypographyInlineCode() {
return (
<code className="bg-muted relative rounded px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold">
@radix-ui/react-alert-dialog
</code>
)
}
Lead
A modal dialog that interrupts the user with important content and expects a response.
export function TypographyLead() {
return (
<p className="text-muted-foreground text-xl">
A modal dialog that interrupts the user with important content and expects
a response.
</p>
)
}
Large
export function TypographyLarge() {
return <div className="text-lg font-semibold">Are you absolutely sure?</div>
}
Small
export function TypographySmall() {
return (
<small className="text-sm leading-none font-medium">Email address</small>
)
}
Muted
Enter your email address.
export function TypographyMuted() {
return (
<p className="text-muted-foreground text-sm">Enter your email address.</p>
)
}