Foundations
Design tokens.
Every token in the system, read live from colors_and_type.css via CSS custom properties.
Hex values resolve at runtime, so what you see here matches what your app gets when you import
@ossrandom/design-system/styles.css. Switch the global theme toggle to see surface tokens flip.
Color · Brand red
Signal Red is the only accent. The full red ramp is reserved for charts and edge cases — production UI should reach for --accent, --accent-hover, --accent-press, --accent-soft.
Color · Brand gray
Cod Gray ramp drives every neutral surface and ink shade. Pulls from --bg-* and --fg-* at runtime.
Accent · semantic
Action color, hover/press states, and the soft tint behind selected items.
Surface & ink
Theme-aware tokens — these flip when data-theme swaps. The chips below resolve through :root, [data-theme="light"], and [data-theme="dark"] blocks.
Typography · families
Three families. Display for impact, sans for body, mono for code & micro labels.
Typography · scale
Each row uses its corresponding --fs-* + --lh-* + --ls-* custom properties.
Spacing
A 4px-stepped scale plus half-steps where the grain of an interface needs them. Bars below render at the literal pixel value.
--space-1
--space-1.5
--space-2
--space-2.5
--space-3
--space-4
--space-5
--space-6
--space-8
--space-10
--space-12
--space-16
--space-20
--space-24
Radii
Tight by default. radius-sm (4px) is the system default — Linear-style.
radius-xs
radius-sm
radius-md
radius-lg
radius-xl
radius-2xl
radius-full
Shadows
Two-layer shadows for depth without haze. Darker, smaller layer for the edge; broader, softer layer for the diffuse halo.
shadow-xs
shadow-sm
shadow-md
shadow-lg
Motion
Each box loops through translate + opacity using its labeled duration and easing. Click ▷ Replay to trigger.
instant · ease-out-quart
fast · ease-out-expo
base · ease-in-out
slow · ease-spring
TypeScript types
Imported from @ossrandom/design-system/tokens. Use these to constrain props at compile time.
| Type | Value |
|---|---|
BrandColor |
| "signal-red" // #E60000 — primary action, live state, errors | "signal-red-700" // #B30000 … |
SemanticColor |
| "success" // green-ish via signal-red? we use mono — runtime cod-gray w/ filled dot | "warn… |
ThemeMode |
"light" | "dark" |
SpaceSize |
"xs" | "sm" | "md" | "lg" | "xl" | number |
Radius |
"none" | "sm" | "md" | "lg" | "pill" | "circle" | number |
Shadow |
"none" | "sm" | "md" | "lg" | "overlay" |
FontFamily |
"sans" | "mono" |
FontWeight |
400 | 500 | 600 | 700 |
TypeScale |
| "display-xl" | "display-lg" | "display-md" | "h1" | "h2" | "h3" | "h4" | "body-lg" | "body-… |
Size |
"xs" | "sm" | "md" | "lg" |
Density |
"comfortable" | "default" | "compact" |
Direction |
"horizontal" | "vertical" |
Axis |
"x" | "y" | "both" |
Align |
"start" | "center" | "end" | "baseline" | "stretch" |
Justify |
"start" | "center" | "end" | "between" | "around" | "evenly" |