Free shadcn/ui typography for React — a set of Tailwind classes for headings, prose, blockquotes, lists, inline code, and tables: a full article, the heading scale, and inline elements.

Prose article

A full styled article — heading, lead, sections, blockquote, and list.

Props

No props documented yet.

Copied!
components/ui/typography-demo-01.tsx
export default function TypographyDemo01() {
  return (
    <div className="w-full max-w-2xl">
      <h1 className="scroll-m-20 text-4xl font-extrabold tracking-tight text-balance">
        The Joke Tax Chronicles
      </h1>
      <p className="text-muted-foreground mt-4 text-xl">
        Once upon a time, in a far-off land, there was a very lazy king who
        spent all day lounging on his throne.
      </p>
      <h2 className="mt-8 scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0">
        The King's Plan
      </h2>
      <p className="leading-7 [&:not(:first-child)]:mt-6">
        The king thought long and hard, and finally came up with a brilliant
        plan: he would tax the jokes in the kingdom.
      </p>
      <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>
      <h3 className="mt-8 scroll-m-20 text-2xl font-semibold tracking-tight">
        The Joke Tax
      </h3>
      <p className="leading-7 [&:not(:first-child)]:mt-6">
        The king's subjects were not amused. They grumbled and complained, but
        the king was firm:
      </p>
      <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>
      <p className="leading-7 [&:not(:first-child)]:mt-6">
        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.
      </p>
    </div>
  )
}

Heading scale

The h1–h4 scale plus lead, large, small, and muted text styles.

Props

No props documented yet.

Copied!
components/ui/typography-headings-01.tsx
export default function TypographyHeadings01() {
  return (
    <div className="w-full max-w-xl space-y-4">
      <h1 className="scroll-m-20 text-4xl font-extrabold tracking-tight">
        Heading 1
      </h1>
      <h2 className="scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight">
        Heading 2
      </h2>
      <h3 className="scroll-m-20 text-2xl font-semibold tracking-tight">
        Heading 3
      </h3>
      <h4 className="scroll-m-20 text-xl font-semibold tracking-tight">
        Heading 4
      </h4>
      <p className="text-muted-foreground text-xl">
        Lead — a larger intro paragraph that sets up the section below it.
      </p>
      <div className="text-lg font-semibold">Large — an emphasized line.</div>
      <p className="leading-7">
        Paragraph — the default body copy with comfortable line height for long
        passages of reading.
      </p>
      <small className="text-sm leading-none font-medium">
        Small — a fine-print line.
      </small>
      <p className="text-muted-foreground text-sm">
        Muted — secondary helper text.
      </p>
    </div>
  )
}

Inline elements & table

Blockquote, inline code, list, and a styled table.

Props

No props documented yet.

Copied!
components/ui/typography-inline-01.tsx
const taxes = [
  { king: "King Solomon", tax: "100 gold coins" },
  { king: "King David", tax: "50 gold coins" },
  { king: "King Frederick", tax: "25 gold coins" },
]

export default function TypographyInline01() {
  return (
    <div className="w-full max-w-xl space-y-6">
      <blockquote className="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>

      <p className="leading-7">
        You can install the package with{" "}
        <code className="bg-muted relative rounded px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold">
          npm install
        </code>{" "}
        and import it anywhere.
      </p>

      <ul className="ml-6 list-disc [&>li]:mt-2">
        <li>First level of puns</li>
        <li>Second level of jokes</li>
        <li>Third level of one-liners</li>
      </ul>

      <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">King</th>
              <th className="border px-4 py-2 text-left font-bold">
                Joke Tax
              </th>
            </tr>
          </thead>
          <tbody>
            {taxes.map((row) => (
              <tr key={row.king} className="even:bg-muted m-0 border-t p-0">
                <td className="border px-4 py-2 text-left">{row.king}</td>
                <td className="border px-4 py-2 text-left">{row.tax}</td>
              </tr>
            ))}
          </tbody>
        </table>
      </div>
    </div>
  )
}

Frequently asked questions

It is not a component — it is a set of Tailwind utility classes for styling headings, paragraphs, blockquotes, lists, inline code, and tables. You copy the classes onto your own elements (h1, p, blockquote, …) rather than installing anything. The examples here give you the canonical class strings for each text style.
No. Typography is pure markup plus Tailwind classes, so there is no package or registry component to add. Copy the class string for the element you need — for instance scroll-m-20 text-4xl font-extrabold tracking-tight on an h1 — and it works wherever Tailwind is set up.
The @tailwindcss/typography plugin styles a block of raw HTML automatically when you add the prose class — ideal for CMS or Markdown output you do not control. The shadcn approach styles each element explicitly with utility classes, which gives you precise, per-element control in JSX. Use prose for rendered Markdown; use these classes for hand-written components.
The scale is: h1 — scroll-m-20 text-4xl font-extrabold tracking-tight; h2 — scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight; h3 — scroll-m-20 text-2xl font-semibold tracking-tight; h4 — scroll-m-20 text-xl font-semibold tracking-tight. The Heading scale example shows them together with the lead, large, small, and muted text styles.
For content you render from Markdown or a CMS, reach for the @tailwindcss/typography prose class on the wrapper instead of styling each tag — you do not control the generated HTML. Keep these per-element classes for the components you write by hand, where you place each h1, p, and blockquote yourself.
The typography classes only set size, weight, spacing, and colour — the font family comes from your Tailwind theme. Set --font-sans (and a heading font if you want one) in your theme, and every element using these classes picks it up. The classes stay font-agnostic so they work with whatever typeface you configure.