Typografie
Praktische sjablonen voor koppen, hoofdtekst, lijstjes, tabellen en inline-code — opgemaakt in de zware, neobrutalistische stijl.
We leveren standaard geen typografie-stijlen mee. Deze pagina is een voorbeeld van hoe je utility-klassen kunt gebruiken om je tekst te stylen.
Er valt geen typografiecomponent te installeren — er wordt standaard niets meegeleverd. Elke sectie hieronder is een kopieer-en-plak-recept van utility-classes voor een gewoon HTML-element (h1–h4, p, blockquote, table, lijsten, inline code), leunend op de tokens van het thema, zodat koppen zwaar uitvallen en randen dik.
Ideaal voor:
- Blogposts en documentatie — koppel MDX- of CMS-uitvoer aan deze classes voor consistente styling van lange teksten.
- Marketingpagina's —
h1, Lead en Large dekken herotekst af zonder apart systeem voor displaytypografie. - Wanneer
@tailwindcss/typographyoverkill is — kopieer alleen de elementen die je nodig hebt in plaats van de prose-plugin binnen te halen.
h1#
Taxing Laughter: The Joke Tax Chronicles
export function TypographyH1() {
return (
<h1 className="scroll-m-20 text-center text-4xl font-extrabold tracking-tight text-balance">h2#
The People of the Kingdom
export function TypographyH2() {
return (
<h2 className="scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0">h3#
The Joke Tax
export function TypographyH3() {
return (
<h3 className="scroll-m-20 text-2xl font-semibold tracking-tight">h4#
People stopped telling jokes
export function TypographyH4() {
return (
<h4 className="scroll-m-20 text-xl font-semibold tracking-tight">p#
The king, seeing how much happier his subjects were, realized the error of his ways and repealed the joke tax.
export function TypographyP() {
return (
<p className="leading-7 [&:not(:first-child)]:mt-6">blockquote#
"After all," he said, "everyone enjoys a good joke, so it's only fair that they should pay for the privilege."
export function TypographyBlockquote() {
return (
<blockquote className="mt-6 border-l-2 pl-6 italic">table#
export function TypographyTable() {
return (
<div className="my-6 w-full overflow-y-auto">list#
- 1st level of puns: 5 gold coins
- 2nd level of jokes: 10 gold coins
- 3rd level of one-liners : 20 gold coins
export function TypographyList() {
return (
<ul className="my-6 ml-6 list-disc [&>li]:mt-2">Inline-code#
@radix-ui/react-alert-dialogexport function TypographyInlineCode() {
return (
<code className="relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold">Lead#
A modal dialog that interrupts the user with important content and expects a response.
export function TypographyLead() {
return (
<p className="text-xl text-muted-foreground">Groot#
export function TypographyLarge() {
return <div className="text-lg font-semibold">Are you absolutely sure?</div>
}Klein#
export function TypographySmall() {
return (
<small className="text-sm leading-none font-medium">Email address</small>Gedempt#
Enter your email address.
export function TypographyMuted() {
return (
<p className="text-sm text-muted-foreground">Enter your email address.</p>RTL#
Om RTL-ondersteuning in Neobrutalism in te schakelen, zie de RTL-configuratiegids.
"use client"
import * as React from "react"Toegankelijkheid#
Deze recepten stylen native elementen, dus de semantiek klopt al — houd dat zo. Kies kopniveaus op basis van de documentstructuur, niet op grootte: schermlezers navigeren per niveau, dus oogt een h2 te groot, geef hem dan een andere stijl in plaats van naar h4 te grijpen. Geef datatabellen een koprij met <th>, zodat cellen aan hun kolommen gekoppeld blijven, en reserveer blockquote voor echte citaten.