MESSAI · DESIGN SYSTEM
Tokens, primitives, patterns
Live examples of every design token and component. Click any code block to copy. Click the gear (top right) to tweak token values in real time.
Tokens
Color, type, spacing, radius, shadow, motion — the lowest layer.
Surface
Page, card, and chrome backgrounds.
Ink
Text colors at varying emphasis.
Accent
Brand accent — used sparingly for actions + focus.
Semantic tones
Five tones for status pills, alerts, and inline messages.
<div style={{
backgroundColor: 'var(--messai-positive-bg)',
color: 'var(--messai-positive-ink)',
border: '1px solid var(--messai-positive-edge)',
}}>healthy</div>Spacing scale
4px baseline rhythm. Use space.4 (16px) as the default gap.
gap: 'var(--messai-space-4)' // 16pxRadius scale
Sharp corners are the project default — never use border-radius unless explicitly requested.
borderRadius: 'var(--messai-radius-base)' // 2pxShadow scale
Restrained elevation. focus is reserved for keyboard focus rings.
boxShadow: 'var(--messai-shadow-md)'Motion / duration
Earned animation. Press Play to see each token's pacing.
transition: 'background-color var(--messai-duration-base) var(--messai-ease-inOut)'Atoms
Single-purpose primitives — Eyebrow, Pill, typography, buttons.
Eyebrow + Pill
Atomic chrome — labels, status indicators.
Eyebrow
<Eyebrow>PERFORMANCE</Eyebrow>Pill — semantic tones
<Pill tone="positive">healthy</Pill>
<Pill tone="caution">attention</Pill>
<Pill tone="critical">error</Pill>
<Pill tone="neutral">label</Pill>
<Pill tone="info">info</Pill>Typography
Type scale across sans / serif / mono.
Type scale
xs · The microbial fuel cell achieved 1.25 W/m²
sm · The microbial fuel cell achieved 1.25 W/m²
base · The microbial fuel cell achieved 1.25 W/m²
lg · The microbial fuel cell achieved 1.25 W/m²
xl · The microbial fuel cell achieved 1.25 W/m²
2xl · The microbial fuel cell achieved 1.25 W/m²
<p style={{ fontSize: 'var(--messai-size-xs)' }}>xs (12px)</p>
<p style={{ fontSize: 'var(--messai-size-base)' }}>base (16px)</p>
<p style={{ fontSize: 'var(--messai-size-2xl)' }}>2xl (24px)</p>Font families
Sans · IBM Plex Sans — UI chrome and body text
Serif · IBM Plex Serif — titles and editorial emphasis
Mono · IBM Plex Mono — values, units, tabular data
<p style={{ fontFamily: 'var(--messai-font-sans)' }}>sans</p>
<p style={{ fontFamily: 'var(--messai-font-serif)' }}>serif</p>
<p style={{ fontFamily: 'var(--messai-font-mono)' }}>mono</p>Buttons
Three button rhythms. (Task 6 Button rewrite pending.)
Buttons
<button>Primary</button>
<button>Secondary</button>
<button>Ghost</button>Molecules
Composed patterns — anchored cards, card grids, form groups.
AnchoredCard — click to open
<AnchoredCard open={open} onClose={close} anchor={{ top: 40, right: 0 }} ariaLabel="..." width={240}>
{/* content */}
</AnchoredCard>Card grid
<div style={{
backgroundColor: 'var(--messai-surface-surface)',
border: '1px solid var(--messai-surface-border)',
borderRadius: 'var(--messai-radius-base)',
padding: 16,
}}>
<Eyebrow>REACTOR</Eyebrow>
<h4>Single-chamber MFC</h4>
<p>Carbon felt anode + air cathode.</p>
<Pill tone="positive">active</Pill>
</div>Form group — label + input + helper + error
<label>External resistance</label>
<input type="text" />
<div className="helper">Ohms (Ω) — the load resistor across the cell.</div>Organisms
Surfaces — stat blocks, tables, inspector panels.
Stat / metric block
<div>
<span className="label">Power density</span>
<span className="value">1.25</span>
<span className="unit">W/m²</span>
</div>Table / data grid
| Parameter | Value | Unit | Source |
|---|---|---|---|
| powerDensity | 1.25 | W/m² | 10.1234/abc |
| currentDensity | 3.40 | A/m² | 10.1234/abc |
| openCircuitVoltage | 0.72 | V | 10.1234/abc |
| coulombicEfficiency | 45 | % | 10.5678/xyz |
<table>
<thead>
<tr><th>Parameter</th><th>Value</th><th>Unit</th><th>Source</th></tr>
</thead>
<tbody>{/* alternating row backgrounds via surfaceAlt */}</tbody>
</table>Inspector panel — sticky right rail
<aside className="inspector">
<Eyebrow>INSPECTOR</Eyebrow>
<h3>Paper context</h3>
{rows.map(row => (
<div className="row">
<span className="label">{row.label}</span>
<span className="value">{row.value}</span>
</div>
))}
</aside>