Skip to content
v0.3.3

Install Uniform Design

Install a pinned release. dist/ is committed, so nothing builds on install.

sh
npm install --save-exact github:UniformChicago/design#v0.3.3

Copy node_modules/@uniform/design/dist/ to your static directory, keeping its structure (CSS references fonts by relative path), and link the stylesheet:

html
<link rel="stylesheet" href="/design/design.css" />

Not using npm? Download dist/ from a tag and check each file against dist/manifest.json.

Usage

Put u-root on the body and compose with native elements. Dark is the default; set data-theme="light" on any element to switch it and everything inside.

html
<body class="u-root" data-theme="light">
  <main class="u-panel">
    <h1 class="u-title">Your workspace<span class="u-dot" aria-hidden="true"></span></h1>
    <p class="u-lede">A clear place to begin.</p>
    <a class="u-button" href="/records">View records</a>
  </main>
</body>

For your own components, use the theme variables and the spacing and radius tokens:

css
.record-card {
  background: var(--u-surface);
  color: var(--u-fg);
  padding: var(--u-space-5);
  border-radius: var(--u-radius-lg);
}

Color

The brand palette, from tokens/tokens.json. It's also available as JavaScript (@uniform/design/tokens) and Python. Consumers never hard-code hex values.

  • --u-ink
    #14212bPrimary text on light; letters in the color lockup
  • --u-paper
    #f3f5f6Text on dark; light surfaces
  • --u-slate
    #5e6e79Secondary text on light; lockup descriptor
  • --u-signal
    #c8402aThe brand dot and accents on light
  • --u-signal-on-dark
    #e3654dSignal tuned for AA on Night
  • --u-lake
    #1f5f7aLinks and labels on light
  • --u-lake-light
    #8fc3d9Links and highlights on dark
  • --u-night
    #0e171eDark background
  • --u-mist
    #9dacb6Secondary text on dark (Slate tuned for AA on Night)
  • --u-rule
    #d5dce0Hairlines on light
  • --u-rule-dark
    #22313bHairlines on dark

Theme variables

Build with these, not the palette. They switch with the theme, so each swatch below changes when you switch between dark and light.

Swatch Token Usage
--u-bg
Page background
--u-surface
Panels and cards
--u-fg
Body text
--u-muted
Secondary text
--u-link
Links, primary buttons
--u-accent
Brand dot, accents
--u-line
Hairlines
--u-hover
Hover fill

Type

Two self-hosted families under the SIL Open Font License. No font CDN.

  • Public Sans

    Regular · body · --u-font-sans

  • Public Sans

    Semibold · headings · --u-font-sans

  • Public Sans

    Bold · titles · --u-font-sans

  • IBM Plex Mono

    Medium · labels, code · --u-font-mono

Spacing and radius

  • 4px--u-space-1
  • 8px--u-space-2
  • 12px--u-space-3
  • 16px--u-space-4
  • 24px--u-space-5
  • 32px--u-space-6
  • 48px--u-space-7
  • --u-radius-sm4px
  • --u-radius-md6px
  • --u-radius-lg10px

Assets

Brand marks ship in dist/svg/, fonts in dist/fonts/. Use the on-dark variants on dark surfaces.

Typography

The brand dot is always u-dot, never a typed period.

Eyebrow label

Page title

Section heading

A lede introduces the page in one or two sentences.

Meta text · 2.4 MB · Updated today

Inline code: sha256:9f3c72b1

html
<p class="u-eyebrow">Eyebrow label</p>
<h3 class="u-title">Page title<span class="u-dot" aria-hidden="true"></span></h3>
<p class="u-heading">Section heading</p>
<p class="u-lede">A lede introduces the page in one or two sentences.</p>
<p class="u-meta">Meta text · 2.4 MB · Updated today</p>
<p>Inline code: <code class="u-code">sha256:9f3c72b1</code></p>

Buttons

Anchors for navigation, buttons for actions; the class only sets the look.

Primary action
html
<a class="u-button" href="#buttons">Primary action</a>
<button class="u-button u-button--quiet" type="button">Quiet action</button>

Tags

Short status labels. Keep the words meaningful without the color.

Neutral Final Inbox
html
<span class="u-tag">Neutral</span>
<span class="u-tag u-tag--ok">Final</span>
<span class="u-tag u-tag--warn">Inbox</span>

Panels

Panel

A surface for grouped content.

Accent panel

The accent edge marks the primary panel on a page.

html
<div class="u-panel">
  <p class="u-heading">Panel</p>
  <p>A surface for grouped content.</p>
</div>
<div class="u-panel u-panel--accent">
  <p class="u-heading">Accent panel</p>
  <p>The accent edge marks the primary panel on a page.</p>
</div>

Callouts

Audit chain verified: 42 entries.

Audit chain broken at entry 17.

html
<p class="u-callout">Audit chain verified: 42 entries.</p>
<p class="u-callout u-callout--danger">Audit chain broken at entry 17.</p>

Facts

Label and value pairs on a dl, inline or stacked.

Category
Agreement
Size
2.4 MB
Name
Jordan Rivera
Service area
Example City
html
<dl class="u-facts">
  <dt>Category</dt>
  <dd>Agreement</dd>
  <dt>Size</dt>
  <dd>2.4 MB</dd>
</dl>
<dl class="u-facts u-facts--stacked">
  <dt>Name</dt>
  <dd>Jordan Rivera</dd>
  <dt>Service area</dt>
  <dd>Example City</dd>
</dl>

Tables

The wrapper scrolls on narrow screens. Give it tabindex="0" role="region" aria-label="…" so keyboard users can reach it.

Name Role Status
Jordan Rivera Example role Active
Sam Lee Example role Pending
html
<div class="u-table" tabindex="0" role="region" aria-label="Example registry">
  <table>
    <thead>
      <tr>
        <th scope="col">Name</th>
        <th scope="col">Role</th>
        <th scope="col">Status</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>Jordan Rivera</td>
        <td>Example role</td>
        <td><span class="u-tag u-tag--ok">Active</span></td>
      </tr>
      <tr>
        <td>Sam Lee</td>
        <td>Example role</td>
        <td><span class="u-tag">Pending</span></td>
      </tr>
    </tbody>
  </table>
</div>

Forms

Wrap or associate every control with its label. Validation and error messages belong to your app.

Uploads stay in your inbox until finalized.
html
<div class="u-field">
  <label for="ex-deal">Transaction</label>
  <input id="ex-deal" type="text" placeholder="e.g. 100 Example St" />
</div>
<div class="u-field">
  <label for="ex-category">Category</label>
  <span class="u-select">
    <select id="ex-category" aria-describedby="ex-category-hint">
      <option>agreement</option>
      <option>disclosure</option>
    </select>
  </span>
  <span class="u-hint" id="ex-category-hint">Uploads stay in your inbox until finalized.</span>
</div>
<div class="u-field">
  <label for="ex-file">File</label>
  <input id="ex-file" type="file" />
</div>

Sliders

Range inputs with dynamic progress fill capabilities.

html
<div class="u-field">
  <label for="slider-demo">Estimated amount</label>
  <input type="range" id="slider-demo" class="u-slider" min="0" max="100" value="50" />
</div>

Empty state

No records yet

Upload a document to start.

html
<div class="u-empty">
  <p class="u-heading">No records yet</p>
  <p>Upload a document to start.</p>
</div>

Progress and checks

40%
Example document Done
Example step In progress
html
<progress class="u-meter" aria-label="Example progress" value="40" max="100">40%</progress>
<div class="u-check u-check--done">
  <span class="u-check__status" aria-hidden="true"></span>
  <span>
    <span class="u-check__title">Example document</span>
    <span class="u-check__detail">Done</span>
  </span>
</div>
<div class="u-check u-check--progress">
  <span class="u-check__status" aria-hidden="true"></span>
  <span>
    <span class="u-check__title">Example step</span>
    <span class="u-check__detail">In progress</span>
  </span>
</div>

Select controls

html
<div class="u-field"><label for="example-status">Status</label><span class="u-select"><select id="example-status"><option>Draft</option><option>Complete</option></select></span></div>

File uploads

No file selected.
html
<div class="u-field"><label for="example-file">Sample PDF</label><input id="example-file" type="file" accept="application/pdf,.pdf" data-u-file aria-describedby="example-file-status"><span id="example-file-status" role="status" class="u-hint">No file selected.</span></div>

Dialogs

Review a sample action

Open a confirmation dialog. Cancel returns you to the preview; confirm updates its status.

No action taken.

Confirm sample action

This demonstrates a confirmation flow. No records will be changed.

html
<div class="u-stack">
  <div>
    <h3 class="u-section-heading">Review a sample action</h3>
    <p class="u-hint">Open a confirmation dialog. Cancel returns you to the preview; confirm updates its status.</p>
  </div>
  <div><button type="button" class="u-button" data-u-dialog-open="example-dialog">Review action</button></div>
  <p class="u-hint" id="example-dialog-status" role="status">No action taken.</p>
  <noscript><p class="u-hint">Enable JavaScript to try the confirmation.</p></noscript>
</div>
<dialog id="example-dialog" class="u-dialog" aria-labelledby="example-dialog-title" aria-describedby="example-dialog-description">
  <h2 id="example-dialog-title" class="u-section-heading">Confirm sample action</h2>
  <p id="example-dialog-description">This demonstrates a confirmation flow. No records will be changed.</p>
  <div class="u-actions">
    <button type="button" class="u-button u-button--quiet" data-u-dialog-close autofocus>Cancel</button>
    <button type="button" class="u-button" data-u-dialog-close="confirmed">Confirm</button>
  </div>
</dialog>

Context menus

Right-click the button, use Shift+F10, or open its actions directly.

No action taken.

html
<button type="button" class="u-button" data-u-context-menu="example-context" data-u-context-open>Open actions</button>
<div id="example-context" class="u-context-menu" popover="auto" role="menu" aria-label="Example actions">
  <button type="button" role="menuitem" tabindex="-1" data-u-context-action="review">Review sample</button>
  <button type="button" role="menuitem" tabindex="-1" disabled>Unavailable action</button>
</div>
<p class="u-hint">Right-click the button, use Shift+F10, or open its actions directly.</p>
<p class="u-hint" id="example-context-status" role="status">No action taken.</p>

Identity

Example contact

Primary contact · Pending

html
<div class="u-identity"><span class="u-avatar" aria-hidden="true">E</span><div><strong>Example contact</strong><p class="u-hint">Primary contact · Pending</p></div></div>

Property cards

Illustrative house exterior
AI-generated sample photo

Courtyard house

$425,000

3 beds · 2 baths · 1,800 sq ft

Fictional property · Sample location

Explore properties
html
<article class="u-map-card s-property-demo">
  <figure class="u-property-thumbnail">
    <img src="gallery/img/house_exterior.jpg" alt="Illustrative house exterior" loading="lazy" width="640" height="400" />
    <figcaption>AI-generated sample photo</figcaption>
  </figure>
  <div class="u-stack s-property-content">
    <h3 class="u-section-heading">Courtyard house</h3>
    <strong>$425,000</strong>
    <p>3 beds · 2 baths · 1,800 sq ft</p>
    <p class="u-hint">Fictional property · Sample location</p>
    <a class="u-button" href="playground/#map-list">Explore properties</a>
  </div>
</article>

Maps

Interactive location-based map components and overlays.

html
<div class="u-stack">
  <div class="s-map-demo u-geo-map" data-doc-map role="region" aria-label="Interactive sample property map"></div>
  <p class="u-hint" data-doc-map-status role="status">Loading street map…</p>
  <a href="playground/#map-list">Try the complete property explorer →</a>
</div>

Charts

Pure CSS and SVG visualizations for dashboards and reports. Built without JavaScript or canvas, relying entirely on DOM elements and inline custom properties for rendering data.

Donut

30%
  • Primary 30%
  • Remaining 70%

Distribution

Trend

24,592 ↑ 12%
html

<div class="s-chart-grid">
  <div>
    <h3 class="u-section-heading">Donut</h3>
    <div class="u-stack s-mt-3">
      <svg viewBox="0 0 100 100" class="u-donut-chart s-m-0" role="img" aria-label="30 percent completed">
        <path class="u-donut-chart-segment" fill="var(--u-link)" d="M50.000000 0.000000 A50 50 0 0 1 97.552826 65.450850 L82.335922 60.506578 A34 34 0 0 0 50.000000 16.000000 Z"></path>
        <path class="u-donut-chart-segment" fill="var(--u-line)" d="M97.552826 65.450850 A50 50 0 1 1 50.000000 0.000000 L50.000000 16.000000 A34 34 0 1 0 82.335922 60.506578 Z"></path>
        <text x="50" y="50" class="u-donut-chart-text s-text-lg">30%</text>
      </svg>
      <ul class="u-legend s-legend-w">
        <li><span class="u-meta"><span class="u-legend-color u-legend-color--pi"></span>Primary</span> <strong>30%</strong></li>
        <li><span class="u-meta"><span class="u-legend-color s-bg-line"></span>Remaining</span> <strong>70%</strong></li>
      </ul>
    </div>
  </div>

  <div class="s-chart-stack">
    <div>
      <h3 class="u-section-heading">Distribution</h3>
      <div class="u-bar-chart" role="img" aria-label="Monthly sample revenue: January 40, February 75, March 55, April 90, May 60, June 50.">
        <div class="u-bar-chart-col"><span class="s-bar-val">40</span><div class="u-bar-chart-bar-wrap"><div class="u-bar s-bar-chart-1" aria-hidden="true"></div></div><span class="u-bar-chart-label">Jan</span></div>
        <div class="u-bar-chart-col"><span class="s-bar-val">75</span><div class="u-bar-chart-bar-wrap"><div class="u-bar s-bar-chart-2" aria-hidden="true"></div></div><span class="u-bar-chart-label">Feb</span></div>
        <div class="u-bar-chart-col"><span class="s-bar-val">55</span><div class="u-bar-chart-bar-wrap"><div class="u-bar s-bar-chart-3" aria-hidden="true"></div></div><span class="u-bar-chart-label">Mar</span></div>
        <div class="u-bar-chart-col"><span class="s-bar-val">90</span><div class="u-bar-chart-bar-wrap"><div class="u-bar s-bar-chart-4" aria-hidden="true"></div></div><span class="u-bar-chart-label">Apr</span></div>
        <div class="u-bar-chart-col"><span class="s-bar-val">60</span><div class="u-bar-chart-bar-wrap"><div class="u-bar s-bar-chart-5" aria-hidden="true"></div></div><span class="u-bar-chart-label">May</span></div>
        <div class="u-bar-chart-col"><span class="s-bar-val">50</span><div class="u-bar-chart-bar-wrap"><div class="u-bar s-bar-chart-3" aria-hidden="true"></div></div><span class="u-bar-chart-label">Jun</span></div>
      </div>
    </div>

    <div>
      <h3 class="u-section-heading">Trend</h3>
      <div class="s-mt-3">
        <div class="s-trend-header">
          <span class="s-trend-val">24,592</span>
          <span class="s-trend-change">↑ 12%</span>
        </div>
        <svg viewBox="0 0 400 60" class="u-sparkline s-sparkline-lg s-block-w-full" role="img" aria-label="Trend over time">
          <defs>
            <linearGradient id="spark-fade" x1="0" y1="0" x2="0" y2="1">
              <stop offset="0%" stop-color="var(--u-link)" stop-opacity="0.2" />
              <stop offset="100%" stop-color="var(--u-link)" stop-opacity="0" />
            </linearGradient>
          </defs>
          <path d="M0,50 L40,40 L80,45 L120,30 L160,35 L200,15 L240,25 L280,10 L320,20 L360,5 L400,8 L400,60 L0,60 Z" fill="url(#spark-fade)" stroke="none" />
          <path d="M0,50 L40,40 L80,45 L120,30 L160,35 L200,15 L240,25 L280,10 L320,20 L360,5 L400,8" fill="none" stroke="var(--u-link)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
          <circle cx="400" cy="8" r="4" fill="var(--u-link)" />
        </svg>
      </div>
    </div>
  </div>
</div>

Activity

Timelines

  1. Event completed

    Uploaded the necessary forms

    Today, 9:00 AM
  2. Event started

    Initial processing

    Yesterday

Task Lists

  • Complete application

    Required before next steps

    Done
  • Sign agreements

    Awaiting signature

    Pending
html
<h3 class="u-section-heading">Timelines</h3>
<ol class="u-activity">
  <li>
    <strong>Event completed</strong>
    <p>Uploaded the necessary forms</p>
    <small>Today, 9:00 AM</small>
  </li>
  <li>
    <strong>Event started</strong>
    <p>Initial processing</p>
    <small>Yesterday</small>
  </li>
</ol>

<h3 class="u-section-heading">Task Lists</h3>
<ul class="u-task-list">
  <li>
    <div>
      <strong>Complete application</strong>
      <p class="u-hint">Required before next steps</p>
    </div>
    <span class="u-tag u-tag--ok">Done</span>
  </li>
  <li>
    <div>
      <strong>Sign agreements</strong>
      <p class="u-hint">Awaiting signature</p>
    </div>
    <span class="u-tag u-tag--warn">Pending</span>
  </li>
</ul>

Releases

Every vX.Y.Z tag becomes a GitHub Release once the full checks pass, with notes, the npm tarball, SHA256SUMS and a signed build-provenance attestation. Upgrade on purpose: change the pinned tag, read the changelog, then test.

sh
gh attestation verify uniform-design-0.3.3.tgz -R UniformChicago/design

Licensing

Code is Apache-2.0. Uniform names, logos, wordmarks and icons are all rights reserved (LICENSE-BRAND). Fonts are under the SIL Open Font License.