stnd.build

Vanilla-First UI Patterns

Copy-paste HTML patterns built strictly with semantic HTML and Standard CSS utilities — zero JavaScript components required.

The 90% Rule: In Standard, 90% of interface blocks do not require a JavaScript component (@stnd/ui). Plain semantic HTML paired with surface roles (.bg-surface, .bg-surface-sunken), layout helpers (.flex-far, .grid), and optical typography utilities (.text-sm, .overline) adapts automatically to all 34 themes in both light and dark modes.

Try switching the active theme or color mode in the top header bar while inspecting the live specimens below.

Live Testbed Shortcut: ]

Audit These Patterns Live in the Workshop

Test how these cards and controls behave under different contrast ratios, font pairings, and baseline rhythms. Click below or press ] to open the live inspector.


Combines .bg-surface, .border, .rounded, and .flex-far for a self-contained card that works inside any .grid column.

Architecture · Layer 1

Swiss Grid & Optical Rhythm

Every spacing token derives mathematically from a single root line-height unit (1rlh) and the Silver Ratio (1.414).

<article class="bg-surface border rounded p flex-col gap-half">
  <div class="flex-far text-xs font-monospace text-muted">
    <span class="uppercase">Architecture · Layer 1</span>
    <time datetime="2026-10-23">4 min read</time>
  </div>
  <h3 class="text-xl font-bold m-0">Swiss Grid &amp; Optical Rhythm</h3>
  <p class="text-sm text-muted m-0">
    Every spacing token derives mathematically from a single root line-height unit (1rlh).
  </p>
  <footer class="flex-far pt-half border-t mt-trim">
    <div class="flex gap-trim items-center">
      <span class="badge">CSS</span>
      <span class="badge">OKLCH</span>
    </div>
    <a href="/manual/css/grid" class="text-xs font-monospace text-accent no-decoration">
      Read specification &rarr;
    </a>
  </footer>
</article>

2. Settings Panel & Native Switch Rows

Native <input type="checkbox" role="switch"> elements are styled automatically by _standard-12-forms.scss. Pair them with .flex-far and .border-b inside .no-rhythm for a zero-JS settings panel.

Public Digital Garden
Allow visitors to browse notes with publish: true
Analog Film Grain
Render subtle paper texture overlay on surfaces
Strict Link Checking
Fail build when an internal [[Wikilink]] is unresolved
<section class="bg-surface border rounded p no-rhythm flex-col gap-half">
  <div class="flex-far pb-half border-b">
    <div>
      <div class="text-sm font-bold">Public Digital Garden</div>
      <div class="text-xs text-muted">Allow visitors to browse notes with publish: true</div>
    </div>
    <input type="checkbox" role="switch" checked />
  </div>
  <div class="flex-far">
    <div>
      <div class="text-sm font-bold">Strict Link Checking</div>
      <div class="text-xs text-muted">Fail build when an internal [[Wikilink]] is unresolved</div>
    </div>
    <input type="checkbox" role="switch" />
  </div>
</section>

3. Metric / Telemetry Bento Grid

Uses .grid with .col-4 sm:col-12 and .font-monospace for tabular numbers that never jitter on update.

Declared Tokens
284
100% documented
Native Themes
34
Light + Dark OKLCH
Contrast Ratio
≥ 7:1
AAA Foreground
<div class="grid compact no-rhythm">
  <div class="col-4 sm:col-12 bg-background border rounded p-half">
    <div class="text-2xs font-monospace uppercase text-muted">Declared Tokens</div>
    <div class="text-2xl font-monospace font-bold mt-trim">284</div>
    <div class="text-xs text-accent font-monospace mt-trim">100% documented</div>
  </div>
  <div class="col-4 sm:col-12 bg-background border rounded p-half">
    <div class="text-2xs font-monospace uppercase text-muted">Native Themes</div>
    <div class="text-2xl font-monospace font-bold mt-trim">34</div>
    <div class="text-xs text-muted font-monospace mt-trim">Light + Dark OKLCH</div>
  </div>
  <div class="col-4 sm:col-12 bg-background border rounded p-half">
    <div class="text-2xs font-monospace uppercase text-muted">Contrast Ratio</div>
    <div class="text-2xl font-monospace font-bold mt-trim">&ge; 7:1</div>
    <div class="text-xs text-muted font-monospace mt-trim">AAA Foreground</div>
  </div>
</div>

4. Command Toolbar / Section Header

Uses .flex-far to align a title and status badge on the left with keyboard shortcuts and action buttons on the right.

Workspace Notes 128 published
⌘K Quick Find
<header class="bg-background border rounded px py-half flex-far no-rhythm">
  <div class="flex gap-half items-center">
    <strong class="text-base">Workspace Notes</strong>
    <span class="badge">128 published</span>
  </div>
  <div class="flex gap-half items-center">
    <span class="text-xs font-monospace text-muted"><kbd>⌘K</kbd> Quick Find</span>
    <button type="button" class="text-xs">New Note</button>
  </div>
</header>

5. Recessed Empty State Well

Uses .bg-surface-sunken + .center-content .flex-col to visually recess an empty state or dropzone below the page background.

No backlinks yet

Link to this note from anywhere in your vault using [[Note Title]] to populate the bidirectional graph.

<div class="bg-surface-sunken border rounded p-2 center-content flex-col gap-half text-center no-rhythm">
  <div class="font-monospace text-xs uppercase text-muted">No backlinks yet</div>
  <p class="text-sm text-muted max-w-prose m-0">
    Link to this note from anywhere in your vault using <code>[[Note Title]]</code>.
  </p>
</div>

6. Responsive Card Grid (3 → 1 Columns)

Uses .grid .gap-2 with .col-4.sm:col-12 to create a 3-column desktop layout that collapses cleanly into a single vertical stack on mobile screens (≤768px).

Zero Config

Standard infers routes, collections, and layouts automatically from your Markdown vault.

OKLCH Colors

Perceptually uniform color spaces across all 34 native light and dark themes.

Silver Ratio

Mathematical spacing increments derived from 1rlh line-height harmonics.

<div class="grid gap-2">
  <article class="col-4 sm:col-12 p-base bg-surface border rounded-lg">
    <h4 class="text-base font-bold m-0">Zero Config</h4>
    <p class="text-sm text-muted m-0 mt-half">Standard infers routes automatically.</p>
  </article>
  <article class="col-4 sm:col-12 p-base bg-surface border rounded-lg">
    <h4 class="text-base font-bold m-0">OKLCH Colors</h4>
    <p class="text-sm text-muted m-0 mt-half">Perceptually uniform color spaces.</p>
  </article>
  <article class="col-4 sm:col-12 p-base bg-surface border rounded-lg">
    <h4 class="text-base font-bold m-0">Silver Ratio</h4>
    <p class="text-sm text-muted m-0 mt-half">Mathematical spacing increments.</p>
  </article>
</div>

7. Split Layout: Sidebar + Main Content (2:1 Ratio)

Combines an 8-column main container (.col-8.sm:col-12) with a 4-column contextual sidebar (.col-4.sm:col-12) using the 12-column Swiss grid.

Primary Content Column

Consumes two-thirds of the available horizontal space on desktop screens, falling back to full-width stacked flow on mobile.

<div class="grid gap-2">
  <main class="col-8 sm:col-12 bg-surface border rounded p-base">
    <h3 class="text-lg font-bold m-0">Primary Content Column</h3>
    <p class="text-sm text-muted m-0 mt-half">Main editorial or application content.</p>
  </main>
  <aside class="col-4 sm:col-12 bg-surface-sunken border rounded p-base">
    <h4 class="text-xs uppercase font-monospace text-muted m-0">Contextual Sidebar</h4>
    <p class="text-xs text-muted m-0 mt-half">Metadata and related links.</p>
  </aside>
</div>

8. User Profile & Avatar Media Object

Uses .flex, .items-center, .gap-half, and .rounded-50 for avatar alignment without custom layout hacks.

FF 
Francis Fontaine Architect & Lead Designer
<div class="flex items-center gap-half bg-surface border rounded p-base max-w-prose">
  <img class="rounded-50" src="/avatar.jpg" width="44" height="44" alt="Francis Fontaine" />
  <div class="flex-col">
    <span class="text-sm font-bold">Francis Fontaine</span>
    <span class="text-xs text-muted font-monospace">Architect &amp; Lead Designer</span>
  </div>
</div>