shadcn-templ

Typography

Styles for headings, paragraphs, lists, etc.

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 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 joke of the day — free
  • 2nd joke of the day — 3 coppers
  • 3rd joke of the day — 6 coppers
  • Each additional joke — 1 gold

The Consequences

The people of the kingdom were very unhappy about the joke tax. The jester, Jokester, was especially displeased. He decided to tell his funniest joke yet: pressShift + Alt + J to summon him.

Large text example
Small text example

Muted text example — secondary information.

templ
templ TypographyDemo() {
	<div class="mx-auto max-w-2xl space-y-6">
		@ui.TypographyH1("", nil) {
			The Joke Tax Chronicles
		}
		@ui.TypographyLead("", nil) {
			Once upon a time, in a far-off land, there was a very lazy king who spent all day lounging on his throne.
		}
		@ui.TypographyH2("", nil) {
			The King's Plan
		}
		@ui.TypographyP("", nil) {
			The king thought long and hard, and finally came up with
			<a href="#" class="font-medium text-primary underline underline-offset-4">a brilliant plan</a>
			: he would tax the jokes in the kingdom.
		}
		@ui.TypographyBlockquote("", nil) {
			"After all," he said, "everyone enjoys a good joke, so it's only fair that they should pay for the privilege."
		}
		@ui.TypographyH3("", nil) {
			The Joke Tax
		}
		@ui.TypographyP("", nil) {
			The king's subjects were not amused. They grumbled and complained, but the king was firm:
		}
		@ui.TypographyList("", nil) {
			<li>1st joke of the day — free</li>
			<li>2nd joke of the day — 3 coppers</li>
			<li>3rd joke of the day — 6 coppers</li>
			<li>Each additional joke — 1 gold</li>
		}
		@ui.TypographyH4("", nil) {
			The Consequences
		}
		@ui.TypographyP("", nil) {
			The people of the kingdom were very unhappy about the joke tax. The jester, Jokester, was especially displeased.
			He decided to tell his funniest joke yet: press
			@ui.TypographyInlineCode("", nil) {
				Shift + Alt + J
			}
			to summon him.
		}
		<div class="space-y-1">
			@ui.TypographyLarge("", nil) {
				Large text example
			}
			@ui.TypographySmall("", nil) {
				Small text example
			}
			@ui.TypographyMuted("", nil) {
				Muted text example — secondary information.
			}
		</div>
	</div>
}