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.
Gallery
At a glance — every pattern on the tokens · each card links to its guideline
- First item
- Second item
- Third item
| Metric | Value |
|---|---|
| Sessions | 1,209,384 |
| Conversions | 18,050 |
| Rate | 1.4931% |
Elevated surface
Depth is a background step, never a shadow.
Accent card
More color on borders.
Click anywhere
Ink border at rest, Red on hover.
Segment stripeTag
Small inline badges in mono at 0.65rem, uppercase, 0.12em tracking, padding 2px by 8px. Four variants, all ink-only.
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.
Section title
With a stripe marker
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.
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.
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.
- Visible 1px borders everywhere
- No shadows; elevation is a background step
- Uppercase monospace labels
- 01Install the theme
- 02Pick a font flavor
- 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.
| Metric | Value | Change |
|---|---|---|
| Sessions | 1,209,384 | +4.2% |
| Conversions | 18,050 | +0.8% |
| Rate | 1.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.
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.
Modal
A backdrop that dims the page with background at 80% (a translucent wash, not a shadow) and a hard-bordered panel: 1px foreground border, background fill, padding space-6, max width 560px.
Page content beneath
Ink and cream, borders, no shadows. The backdrop is a dim, not a shadow.
No radius, no elevation shadow, no blur. Actions sit in a row at the bottom as Buttons; the destructive choice uses the Destructive variant, the safe one Outlined. Use role="dialog" and aria-modal.
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.
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.
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.
.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.