module/design-system

Design System

The single source of truth for every pixel rendered in W3AI.

Tokens, primitives, density rules, and motion grammar. Every other module composes from here. Nothing in product code defines a color, radius, or duration directly.

State Logic

Reactive surfaces this module exposes to the runtime.

themeenum

dark | light. Dark-first. Light is derived, never authored.

densityenum

compact | regular | spacious. Drives spacing scale only.

reducedMotionboolean

Mirrors OS preference. Disables non-essential motion.

accentRuntimeenum

ai | wallet | agent | gov | enterprise. Tints the active surface.

Visual Variants

Allowed rendering modes. No ad-hoc styles outside this set.

surface.glass

Floating panels, navigation, modals.

surface.solid

Dialog confirmations, destructive sheets.

surface.inset

Read-only data, inactive runtimes.

text.display

SF Pro Display. Headers only.

text.mono

SF Mono. Addresses, hashes, runtime IDs.

elev.0 / 1 / 2 / 3

Four-step elevation. No custom shadows.

Motion Tokens

Deterministic timing curves. No custom easing per component.

tokenvalueuse
motion.fast120ms ease-outHover, focus, toggle.
motion.base240ms cubic-bezier(.2,.8,.2,1)Panel enter, route change.
motion.slow480ms cubic-bezier(.2,.8,.2,1)Glass morph, runtime swap.
motion.springstiffness 240, damping 28Drag, sheet drop.

Isolation Rules

Hard boundaries enforced at the module edge.

01

No raw hex values in product code. Only semantic tokens from styles.css.

02

No bespoke easing curves. Use the four motion tokens above.

03

Components may not introduce new elevation levels.

04

Typography pairings are fixed. Display + Mono. No third family.

// end module /design-system