Components / Typography
Typography
Styles for headings, paragraphs, lists, and more. These are plain Tailwind utility classes; copy them onto your markup, no component required.
The Joke Tax Chronicles
Once upon a time, in a far-off land, there was a very lazy king who spent all day lounging on his throne. One day, his advisors came to him with a problem: the kingdom was running out of money.
The King's Plan
The king thought long and hard, and finally came up with a brilliant plan: he would tax the jokes in the kingdom.
"After all," he said, "everyone enjoys a good joke, so it's only fair that they should pay for the privilege."
The Joke Tax
The king's subjects were not amused. They grumbled and complained, but the king was firm:
- 1st level of puns: 5 gold coins
- 2nd level of jokes: 10 gold coins
- 3rd level of one-liners : 20 gold coins
As a result, people stopped telling jokes, and the kingdom fell into a gloom. But there was one person who refused to let the king's foolishness get him down: a court jester named Jokester.
Jokester's Revolt
Jokester began sneaking into the castle in the middle of the night and leaving jokes all over the place: under the king's pillow, in his soup, even in the royal toilet. The king was furious, but he couldn't seem to stop Jokester.
And then, one day, the people of the kingdom discovered that the jokes left by Jokester were so funny that they couldn't help but laugh. And once they started laughing, they couldn't stop.
The People's Rebellion
The people of the kingdom, feeling uplifted by the laughter, started to tell jokes and puns again, and soon the entire kingdom was in on the joke.
| King's Treasury | People's happiness |
|---|---|
| Empty | Overflowing |
| Modest | Satisfied |
| Full | Ecstatic |
The moral of the story is: never underestimate the power of a good laugh and always be careful of bad ideas.
Below, each style is broken out on its own so you can grab the exact classes you need.
h1
Taxing Laughter: The Joke Tax Chronicles
<h1 class="scroll-m-20 text-4xl font-extrabold tracking-tight text-balance">
Taxing Laughter: The Joke Tax Chronicles
</h1>h2
The People of the Kingdom
<h2 class="scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0">
The People of the Kingdom
</h2>h3
The Joke Tax
<h3 class="scroll-m-20 text-2xl font-semibold tracking-tight">
The Joke Tax
</h3>h4
People stopped telling jokes
<h4 class="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.
<p class="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."
<blockquote class="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>List
- 1st level of puns: 5 gold coins
- 2nd level of jokes: 10 gold coins
- 3rd level of one-liners : 20 gold coins
<ul class="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
navius add alert-dialog
<code class="relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold">
navius add alert-dialog
</code>Table
| King's Treasury | People's happiness |
|---|---|
| Empty | Overflowing |
| Modest | Satisfied |
<div class="my-6 w-full overflow-y-auto">
<table class="w-full">
<thead>
<tr class="m-0 border-t p-0 even:bg-muted">
<th class="border px-4 py-2 text-left font-bold [&[align=center]]:text-center [&[align=right]]:text-right">
King's Treasury
</th>
<th class="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 class="m-0 border-t p-0 even:bg-muted">
<td class="border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right">
Empty
</td>
<td class="border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right">
Overflowing
</td>
</tr>
</tbody>
</table>
</div>Lead
A modal dialog that interrupts the user with important content and expects a response.
<p class="text-xl text-muted-foreground">
A modal dialog that interrupts the user with important content and expects
a response.
</p>Large
<div class="text-lg font-semibold">Are you absolutely sure?</div>Small
<small class="text-sm leading-none font-medium">Email address</small>Muted
Enter your email address.
<p class="text-sm text-muted-foreground">Enter your email address.</p>Component
Reach for the utility classes above for one-off markup. When you would rather bind the scale to a component, ZitsTypography maps a Variant to the right semantic element and classes; As overrides the rendered element.
The People of the Kingdom
Once upon a time, in a far-off land, there was a very lazy king who spent all day lounging on his throne.
After all, everyone enjoys a good joke.
Enter your email address.
<ZitsTypography Variant="H3">The People of the Kingdom</ZitsTypography>
<ZitsTypography Variant="P">Once upon a time, in a far-off land...</ZitsTypography>
<ZitsTypography Variant="Blockquote">After all, everyone enjoys a good joke.</ZitsTypography>
<ZitsTypography Variant="Muted" As="span">Enter your email address.</ZitsTypography>navius add typographyZitsTypography (variants: H1 | H2 | H3 | H4 | P | Blockquote | List | InlineCode | Lead | Large | Small | Muted):
| Prop | Type | Default |
|---|---|---|
| Variant | string | "P" |
| As | string? | variant element |