04 — Patterns

Components

Sixteen patterns, each a small amount of HTML on the tokens. Every demo below is live and copyable; every guideline says what the consumer provides. Nothing here adds a color, a shadow or a rounded container.

Button

Five variants in the uppercase mono label style, differentiated by border and fill, never by a new color. All buttons are mono, 0.75rem, uppercase, 0.2em tracking, padding space-2 by space-4, square corners.

Variants
Hover — destructive button Red's real signal, made visible
Default
Hover
Hover — accent button Same mechanism as Destructive
Default
Hover
  • Ghost / nav (most common): no border, muted-foreground, foreground on hover.
  • Outlined: 1px foreground border; inverts to a foreground fill with background text on hover.
  • Filled (primary action, rare): foreground fill, background text, 90% on hover.
  • Destructive: 1px primary border and text; fills with primary on hover. Red's named destructive job.
  • Accent: identical treatment under a separate semantic name for general emphasis. One accent cannot look two ways.
  • Disabled is always opacity 0.4, never a color change. Focus is a 1px ring.

Tag

Small inline badges in mono at 0.65rem, uppercase, 0.12em tracking, padding 2px by 8px. Four variants, all ink-only.

Variants
NeutralSignalOutlinedSaved

Neutral is plain muted-foreground text. Signal (latest, highlight) inverts to a foreground fill. Outlined is a dashed foreground border at 50% with a 4px dot prefix. Saved is a solid border at 30%, text at 50%, same dot. Never rounded-full on a tag; never primary on a tag. The consumer provides the text.

Card

A bordered surface one background step above the page: 1px border, card fill, padding space-6, square corners. Elevation is that step and nothing else.

Elevated surface

Depth is a background step, never a shadow.

Accent card

Red border and an 8% wash: more color on borders.

Interactive card

Ink border at rest, red on hover. Click anywhere.

Accent card: 1px primary border and a wash of primary at 8% over card. Static; for the one thing on a page that deserves more color. Interactive card: wrap in <a> or <button>; border at rest moves to primary on hover over 0.15s, the same single-accent hover hierarchy as the Accent button. Titles are mono 700; descriptions body-small in muted-foreground. Nest a SectionHeader for titled regions.

Input

A text field on the input surface with a 1px border, padding space-2 by space-3, mono text at 0.85rem and a muted-foreground placeholder. Focus is a 1px ring, the accent's named focus job.

The label above is the uppercase mono label: muted-foreground at rest, foreground and weight 700 when the field is active. Square corners, no inner shadow. Errors are expressed by weight and copy, not by turning the field red. The consumer provides label, placeholder, value and validation.

SectionHeader

A heading beside a full-width 1px rule in border, baseline-aligned, gap space-3, margin-bottom space-6. The section header everywhere: cards, pages, panels.

Forms
Section title
With a stripe marker
Semantic tokens — never a raw hex in markup

The title is h5 in display (mono, or Jost with .jost); a lighter form uses the uppercase mono label instead. Optionally a 36px SegmentStripe marker precedes the title. The consumer provides the title text.

Toggle

Two or more inline options separated by a middot, for theme, flavor, language and other small enumerated choices. No switch chrome, no pill, no track.

Groups
·
·
··

The active option is foreground; the rest are muted-foreground with a hover lift; the middot sits at 0.4 opacity. Use aria-pressed on each button. On the red Sidebar the same control renders in primary-foreground at 0.6 opacity, 1 when pressed. The live toggles in this site's sidebar are this component.

StatusPip

An inline source or connection indicator: a 6px dot and an uppercase mono label at 0.75rem with 0.15em tracking. State is carried by the dot alone; the text stays neutral.

States
ConnectedWarningLoadingDisconnected

Connected is foreground; Warning is primary, the accent's one sanctioned status use; Loading is muted-foreground at 30% with a pulse; Disconnected is foreground at 25%. The dot is the only element in the system that may be rounded-full.

List

No round bullet glyphs. Unordered items are separated by a 1px border top rule; ordered items lead with a two-digit tabular mono number in muted-foreground.

Unordered — divider, not a bullet
  • Visible 1px borders everywhere
  • No shadows; elevation is a background step
  • Uppercase monospace labels
Ordered — tabular mono numbers
  1. 01Install the theme
  2. 02Pick a font flavor
  3. 03Build with semantic tokens

Dividers and numbers stay ink and muted-foreground only. Using primary as a list marker is a hard rule violation, not a style preference.

Table

A bold mono header row (0.7rem, uppercase, 0.1em tracking) over a 2px border rule, 1px rows, body cells in sans at 0.85rem. Numeric columns are right-aligned with tabular figures.

Data table — tabular-nums, no zebra striping
MetricValueChange
Sessions1,209,384+4.2%
Conversions18,050+0.8%
Rate1.4931%−0.1%

No zebra striping, no hover fill, no accent-colored rules. Positive and negative change are plain numerals with a sign, never green or red.

SegmentStripe

Two equal solid segments, foreground then primary, 3px tall, as a static decorative divider or spacer at any length.

Three lengths
36px · marker before a heading
64px · under the hero wordmark
140px · closing flourish

Always two equal segments in this exact order. Purely decorative, never interactive or meaningful. Use it selectively, a handful of times per page; the default divider remains the 1px border rule. Add aria-hidden="true". Full guidance under Structural Block.

HeroBand

The Structural Block as a horizontal band: a solid primary block with primary-foreground text, padding space-16 by 48px, used once at the top of a page as an alternative to the Sidebar.

Structural Block · hero band

Two colors, one accent.

Below the band, ink and cream take over every other surface. One strong accent as a bold word; everything else is weight, space, and contrast.

Never combined with a Sidebar. The bold-word accent (one word in primary at normal weight and size) is independent and may combine with either block form. The consumer provides the heading and any label.

Figure

An image in a 1px border container at a consistent aspect ratio (4:3 or 16:9), with a mono italic caption beneath a 1px rule. Grayscale by default.

Fig. 1 — grayscale, the default treatment. Keeps the three-token palette intact.
Fig. 2 — full color, because the photograph itself is the content — a named, scoped exception.

The default is filter: grayscale(1) or a duotone mapped toward ink and cream, echoing the Swiss tradition of black-and-white photography. Full color is a scoped exception: only when the photograph itself is the primary content (a post's photography, a portfolio, product shots), never for decorative images in UI chrome. The demo stands in for a photograph with a swatch.

Chart

Hand-rolled SVG in foreground, muted-foreground and primary; outline rings and dashes, not hues. The full treatment, including the restyled Observable Plot, is on the Charts page.

Share bars — outline ring marks the highlight
Differential — foreground above, primary below zero

width="100%", a fixed height, a viewBox from the data range. Encode categories and emphasis with fill opacity, solid versus dashed strokes and outline rings, never a new hue.

Icon

Lucide is the single sanctioned icon set, mirroring the two-font rule: no other library, no icon fonts, no emoji. Restyle three defaults with one CSS rule.

Lucide, restyled — stroke 1.5, square caps, miter joins
View on GitHub
.icon {{ width: 20px; height: 20px; fill: none; stroke: currentColor;
  stroke-width: 1.5; stroke-linecap: square; stroke-linejoin: miter; }}

Size 16 to 20px, currentColor so icons inherit foreground or muted-foreground; primary only in the destructive and accent cases already reserved for it. Icons augment the uppercase mono label and never replace it. In React use lucide-react with the same stroke props. Shown: menu, x, arrow-right, external-link, sun, moon, arrow-up-right.