Primitives

Typography

Canonical class recipes for headings, paragraphs, blockquotes, tables, lists, and inline text, matching the shadcn/ui typography conventions used throughout this site.


Typography Examples

Headings

Taxing Laughter: The Joke Tax Chronicles

The People of the Kingdom

The Joke Tax

People stopped telling jokes

Paragraph

The king, seeing how much happier his subjects were, realized the error of his ways and repealed the joke tax.

Blockquote

"After all," he said, "everyone enjoys a good joke, so it's only fair that they should pay for the privilege."

Table

King's TreasuryPeople's Happiness
EmptyOverflowing
ModestSatisfied

List

  • 1st level of puns: 5 gold coins
  • 2nd level of jokes: 10 gold coins
  • 3rd level of one-liners: 20 gold coins

Inline Code

On your keyboard, press ⌘K to open the command menu.

Lead

A modal dialog that interrupts the user with important content and expects a response.

Large / Small / Muted

Are you absolutely sure?
Email address

Enter your email address.

Installation

# Typography is a set of Tailwind class recipes applied directly to
# standard HTML elements, no dedicated component file is required.

Usage

export function TypographyDemo() {
  return (
    <div>
      <h1 className="scroll-m-20 text-4xl font-extrabold tracking-tight text-balance">
        Taxing Laughter: The Joke Tax Chronicles
      </h1>
      <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>
    </div>
  )
}

Elements

ElementDescription
h1 - h4Heading levels, from page titles down to section headings
pBody paragraph text
blockquoteQuoted content with a left border
tableA basic bordered table
ulAn unordered list
codeInline code snippet
leadA larger muted introductory paragraph
large / small / mutedUtility text sizes for emphasis or de-emphasis
Previous
Tooltip