Text
Brutalist typography primitive using DM Sans font roles, crisp ink tokens, and all eight Base Text axes.
Brutalist Text realizes Base Text with DM Sans font roles (500 body, 700 heading) and high-contrast Brutalist ink tokens while remaining passive, shadowless, and free of extra motion per the Brutalist design contract.
Preview
Section titled “Preview”<article class="flex max-w-xl flex-col gap-4">
<h1>
<proto-ui-brutalist-text
size="4xl"
font="heading"
weight="bold"
leading="tight"
tracking="tight"
>
Bold Print. Zero Ambiguity.
</proto-ui-brutalist-text>
</h1>
<p>
<proto-ui-brutalist-text
size="base"
font="body"
weight="medium"
leading="relaxed"
>
Brutalist typography pairs DM Sans 700 headings with DM Sans
500 body copy while keeping text passive, shadowless, and
effortlessly selectable.
</proto-ui-brutalist-text>
</p>
<p>
<proto-ui-brutalist-text
size="sm"
tone="muted"
weight="medium"
emphasis="italic"
>
"Strong hierarchy comes from weight and scale, not decorative
clutter."
</proto-ui-brutalist-text>
</p>
<div class="flex flex-wrap items-center gap-3">
<code>
<proto-ui-brutalist-text
size="sm"
font="mono"
weight="semibold"
tracking="tight"
decoration="underline"
>
npx @proto.ui/cli add wc brutalist-text
</proto-ui-brutalist-text>
</code>
<proto-ui-brutalist-text size="xs" tone="muted" weight="medium">
DM Sans 500 / 700
</proto-ui-brutalist-text>
</div>
</article>Installation
Section titled “Installation”Available starting in 0.3.0-rc.1 and later releases. Generate local facades with the brutalist-text CLI target or import brutalistTextRoot (aliased as textRoot and BrutalistTextRoot) from @proto.ui/prototypes-brutalist/text:
npx @proto.ui/cli@latest add wc brutalist-text
pnpm dlx @proto.ui/cli@latest add wc brutalist-text
Replace wc with react, vue, or vue2 for your target framework.
import { BrutalistTextRoot } from '../proto-ui/components/react';
export function SectionTitle() { return ( <h1> <BrutalistTextRoot size="4xl" font="heading" weight="bold" leading="tight" tracking="tight"> Account settings </BrutalistTextRoot> </h1> );}Semantics and design contract rules
Section titled “Semantics and design contract rules”- DM Sans hierarchy: Pair
font="body" weight="medium"(DM Sans 500) for prose and control labels withfont="heading" weight="bold"(DM Sans 700) for headings. Passive text never carries hard borders or offset shadows. - Native semantic wrappers: Keep
h1–h6,p,label(htmlFor/for), anda(href,target,download) on enclosing native elements. Text never adds tab stops or activation handlers. - Leading, tracking, and defaults:
leading="size"retains each size token’s built-in line height (xs1remthrough5xl1);leading="tighter"maps to1.1, andtracking="tighter"maps to-0.05em. Removing a prop restores its default; invalid initialsizefalls back tobase, while invalid updates keep the previous valid value.
Examples
Section titled “Examples”DM Sans scale and weight hierarchy
Section titled “DM Sans scale and weight hierarchy”Showcases poster headlines (5xl bold with leading="tighter" and tracking="tighter"), card headings, body copy, and compact control captions.
<div class="flex max-w-xl flex-col gap-3">
<h1>
<proto-ui-brutalist-text
size="5xl"
font="heading"
weight="bold"
leading="tighter"
tracking="tighter"
>
5xl · Poster Headline
</proto-ui-brutalist-text>
</h1>
<h2>
<proto-ui-brutalist-text
size="3xl"
font="heading"
weight="bold"
leading="tight"
tracking="tight"
>
3xl · Section Title (DM Sans 700)
</proto-ui-brutalist-text>
</h2>
<h3>
<proto-ui-brutalist-text
size="xl"
font="heading"
weight="bold"
leading="snug"
>
xl · Card Header
</proto-ui-brutalist-text>
</h3>
<p>
<proto-ui-brutalist-text
size="base"
font="body"
weight="medium"
leading="normal"
>
base · Body & control text (DM Sans 500)
</proto-ui-brutalist-text>
</p>
<small>
<proto-ui-brutalist-text
size="sm"
font="body"
weight="medium"
leading="size"
>
sm · 14px / 20px standard control label
</proto-ui-brutalist-text>
</small>
<small>
<proto-ui-brutalist-text
size="xs"
font="body"
tone="muted"
weight="medium"
leading="size"
>
xs · 12px / 16px compact badge & caption
</proto-ui-brutalist-text>
</small>
</div>Editorial blocks and inline styles
Section titled “Editorial blocks and inline styles”Lead copy, italic pull quotes, inline monospace tokens, underlined links, and strikethrough text.
<div class="flex max-w-xl flex-col gap-4">
<p>
<proto-ui-brutalist-text
size="xl"
tone="muted"
weight="medium"
leading="relaxed"
>
Lead summary copy sets expectations before the reader dives
into detailed specs.
</proto-ui-brutalist-text>
</p>
<blockquote class="border-s-4 border-border ps-4">
<proto-ui-brutalist-text
weight="medium"
emphasis="italic"
leading="relaxed"
>
"Keep decorative borders on structural frames, never on
passive text."
</proto-ui-brutalist-text>
</blockquote>
<div class="flex flex-wrap items-center gap-3">
<code class="rounded bg-muted px-2 py-0.5">
<proto-ui-brutalist-text
size="sm"
font="mono"
weight="semibold"
leading="size"
>
BRUTALIST_THEME
</proto-ui-brutalist-text>
</code>
<a href="#api">
<proto-ui-brutalist-text
size="sm"
weight="bold"
decoration="underline"
>
Read API props
</proto-ui-brutalist-text>
</a>
<del>
<proto-ui-brutalist-text
size="sm"
tone="muted"
decoration="line-through"
>
Deprecated label
</proto-ui-brutalist-text>
</del>
</div>
</div>Accent surfaces and foreground inheritance
Section titled “Accent surfaces and foreground inheritance”Pair tone="inherit" with raised Brutalist Surface containers (#5294ff main blue or secondary cards) so ink contrast stays sharp in both light and dark themes.
<div class="grid max-w-xl grid-cols-1 gap-4 sm:grid-cols-2">
<proto-ui-brutalist-surface
variant="solid"
elevation="raised"
border="all"
>
<div class="flex flex-col gap-1 p-4">
<proto-ui-brutalist-text
size="base"
font="heading"
weight="bold"
tone="inherit"
>
Main Surface (#5294ff)
</proto-ui-brutalist-text>
<proto-ui-brutalist-text
size="sm"
weight="medium"
tone="inherit"
>
tone="inherit" keeps crisp black ink over accent fills.
</proto-ui-brutalist-text>
</div>
</proto-ui-brutalist-surface>
<proto-ui-brutalist-surface
variant="secondary"
elevation="raised"
border="all"
>
<div class="flex flex-col gap-1 p-4">
<proto-ui-brutalist-text
size="base"
font="heading"
weight="bold"
tone="default"
>
Secondary Card Surface
</proto-ui-brutalist-text>
<proto-ui-brutalist-text
size="sm"
weight="medium"
tone="muted"
>
Pairs default foreground headings with muted captions.
</proto-ui-brutalist-text>
</div>
</proto-ui-brutalist-surface>
</div>The following props belong to Root (BrutalistTextRoot):
| Prop | Type | Default | Description |
|---|---|---|---|
size | 'xs' 'sm' 'base' 'lg' 'xl' '2xl' '3xl' '4xl' '5xl' | base | Font size scale |
tone | 'default' 'muted' 'inherit' | default | Ink tone; set to inherit inside solid or accent surfaces |
weight | 'normal' 'medium' 'semibold' 'bold' | normal | Font weight (medium for body/controls, bold for headings) |
font | 'body' 'heading' 'mono' | body | Font family role (DM Sans body/heading or monospace) |
leading | 'size' 'tighter' 'tight' 'snug' 'normal' 'relaxed' | normal | Line height; size keeps built-in line boxes and tighter maps to 1.1 |
tracking | 'normal' 'tight' 'tighter' | normal | Letter spacing; tight maps to -0.025em and tighter maps to -0.05em |
emphasis | 'normal' 'italic' | normal | Normal or italic font style |
decoration | 'none' 'underline' 'line-through' | none | Text decoration line |