GitHub 560+

Typography

Automatic prose styling and semantic text primitives for documentation and content-heavy interfaces.

Taxing Laughter: 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.

The royal scribes published the decree in every square and marketplace. You can still read the archived notice at the official registry .

The King's Plan

The king's subjects were not amused. One day, the king thought to himself, "I should tax the jokes in the kingdom." And so he did.

The People Rebel

At first, everyone enjoyed the clever new tax code. But eventually, the people had had enough.

A Small Exception

Court jesters were granted a temporary discount.

“After all,” he said, “everyone enjoys a good joke, so it's only fair that they pay for the privilege.”
Updated 2 days ago

This is the punchline.

Installation

npx shadcn@latest add @fulldev/typography

Usage

Use Typography as a wrapper around rendered content, markdown output, or regular HTML when you want the component to style its children automatically. Use the individual typography components when you want explicit primitives in a component example or custom layout.

Every typography component accepts size="sm", size="default", or size="lg". The default size keeps body text at the base font size. On the Typography wrapper, size only scales the wrapper-level heading and lead styles. Regular child prose such as paragraphs, lists, blockquotes, code, small text, and tables keeps its normal default size. Use the individual components’ own size prop when those elements need to change size.

import {
  Typography,
  TypographyA,
  TypographyBlockquote,
  TypographyH1,
  TypographyH2,
  TypographyH3,
  TypographyH4,
  TypographyInlineCode,
  TypographyLead,
  TypographyList,
  TypographyListItem,
  TypographyP,
  TypographyTable,
  TypographyTableCell,
  TypographyTableHead,
  TypographyTableRow,
} from "@/components/ui/typography"

Child elements

The Typography wrapper styles supported child elements directly. Headings, paragraphs, links, blockquotes, lists, tables, inline code, and preformatted code can be regular HTML.

Rendered content

Drop in regular HTML when the content is generated, copied from markdown, or owned by another component. The wrapper applies the expected spacing, type scale, and inline styles.

  • Headings receive the matching type treatment.
  • Lists get readable indentation and vertical rhythm.
  • Inline code and links are styled automatically.
The wrapper is useful when the markup is semantic, but the typography should stay consistent with the rest of the system.

Child components

TypographyH1

Taxing Laughter: The Joke Tax Chronicles

TypographyH2

The People of the Kingdom

TypographyH3

The Joke Tax

TypographyH4

People stopped telling jokes

TypographyP

The king's subjects were not amused. One day, the king thought to himself, "I should tax the jokes in the kingdom." And so he did.

TypographyA

Read more in the official registry .

TypographyBlockquote

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

TypographyTable

Region Tax rate Notes
North 5% Seasonal exemptions apply
South 8% Includes performance permits

TypographyList

  • Royal decrees
  • Village announcements
  • Town square gossip

TypographyInlineCode

Use TypographyInlineCode for short code references inside prose.

TypographyLead

A full set of semantic text primitives for documentation, marketing copy, and editorial layouts.

Notes

  • Wrap long-form prose in Typography when you want sensible defaults for headings, paragraphs, lists, tables, and inline code.
  • Use the individual typography primitives when you want explicit semantic composition inside a component example or a custom layout.

API Reference

See the GitHub source code for more information on props.