Components/Foundation/Typography
COMPONENT58.58

Typography

Opt-in document typography: the .prose wrapper carries heading scale, list rhythm, link, quote, code and table styles.


INSTALL

1pnpm dlx @sayagodev/mo add typography

Or import the files from the package (no copy):

1import "@sayagodev/mo/css/prose.css";

EXAMPLES

H1

Taxing Laughter: The Joke Tax Chronicles

H2

The People of the Kingdom

H3

The Joke Tax

H4

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."
List
  • 1st level of puns: 5 gold coins
  • 2nd level of jokes: 10 gold coins
  • 3rd level of one-liners : 20 gold coins
Lead

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

Large

Are you absolutely sure?

Small

Email address

Muted

Enter your email address.

Inline code
@radix-ui/react-alert-dialog
Table
King's Treasury People's happiness
Empty Overflowing
Modest Satisfied
Full Ecstatic
Demo

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. 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 king, seeing how much happier his subjects were, realized the error of his ways and repealed the joke tax. Jokester was declared a hero, and the kingdom lived happily ever after.

The moral of the story is: never underestimate the power of a good laugh and always be careful of bad ideas.

USAGE

1<div class="prose">2  <h1>Document title</h1>3  <p>Body copy with <a href="#">a link</a>, <code>inline code</code>4     and <strong>bold</strong>.</p>5  <blockquote>A quoted line.</blockquote>6  <ul><li>List item</li></ul>7</div>8 9<!-- outside .prose everything renders unstyled -->

API

NAMEKINDDESCRIPTION
.proseclassOpt-in wrapper scoping all document typography
h1…h6element--text-1 → --text-5 (h6 regular) semibold scale with spaced rhythm
smallelementFine print at --text-8
.text-lightclassMuted-foreground utility — pairs with p for lead/muted-style paragraphs
strong / belementBold emphasis for large-style callouts
code / preelementFaint chip inline · bordered pre block
blockquoteelement2px inline-start hairline, padded, muted
tableelementFull-width hairline rows, semibold th
mark / hrelementWarning-tinted highlight · spaced rule

FILES

src/css/prose.css
Install:mo add typography

THEMING · PLAYGROUND

This is the exact component from the examples above, wearing a completely different theme. Edit the tokens and --mo-* hooks in the editor — autocomplete knows them all — and the preview obeys in real time. Your CSS always wins.

Tokens & hooks — edit live
Global tokens
--border--muted-foreground--primary--radius--warning

Preview

The Joke Tax

Body copy with a link, inline code and bold.

A quoted line.

Your CSS

Try it: type --mo- for the component hooks, or edit any value — the preview obeys in real time.