Foundations
The shared decisions behind every Gamma component, expressed as tokens so a whole design system can be swapped at once.
One contract, many systems.
Components never hardcode a color, font, radius, easing, or shadow. They read --gamma-* custom properties, and a design system supplies all thirty-six values. Gamma is the default system installed on the document root; the design-system library holds the alternatives.
- Mode tokens change between light and dark: surfaces, text, accent, semantic colors, shadows, focus ring, selection.
- Type, shape, and motion tokens are fixed for a system.
- A scope element with
data-design-systembecomes an island; the nearest scope wins.
Quiet surfaces. Clear signals.
Color gives each control an understandable role without competing with the live component. Text pairs hold 4.5:1 contrast in both modes; the checker enforces it.
--gamma-bg#ffffff--gamma-surface#f8faff--gamma-surface-2#f2f5fb--gamma-ink#17233a--gamma-muted#65738b--gamma-border#e3e9f3--gamma-accent#275bea--gamma-accent-ink#ffffff--gamma-success#16845b--gamma-danger#c83e4c--gamma-warning#9a6200Readable at every scale.
DM Sans carries the interface and its headings; IBM Plex Mono marks source, values, and measurements. Display headings track to -0.03em; nothing tightens further.
Use plain labels, short guidance, and enough contrast for everyday work.
onComplete(value: string) → voidSpace follows purpose.
Four pixels is the base unit. Density increases in navigation and code, while live previews get room to breathe. Radii come in four sizes plus a pill; buttons may pick their own.
4px8px12px16px24px32px48pxMotion explains state.
Three durations cover feedback, routine change, and layout. Transitions use the standard curve, arrivals use the emphasized curve, and only elastic controls use the spring. Every animation has a reduced-motion path.
130msFastHover, press, focus200msBaseToggles, reveals, labels360msSlowPanels, trays, arrivals- Standard
cubic-bezier(0.2, 0.8, 0.2, 1) - Emphasized
cubic-bezier(0.16, 1, 0.3, 1) - Spring
cubic-bezier(0.2, 1.3, 0.35, 1)
Depth is tinted from the ink.
Three shadows carry an offset and a soft blur; none is a halo. Elevation is declared once per surface, either a hairline or a shadow.
Every state earns its place.
Interactive components have clear keyboard paths, accessible names, and motion that respects user preferences.
- Native semantics are the default starting point.
- Focus, loading, error, and disabled states are deliberate.
- Every component renders under every design system in the library.
- Captured evidence stays in review until source and rights are checked.