Skip to main content
All visual design in OlonJS is controlled by tokens in src/data/config/theme.json. Every color, typeface, radius, spacing value, and z-index layer used across your site derives from this single file. This page is the complete reference for every token available.

Color tokens

Color tokens live under tokens.colors. Every token maps to a semantic role rather than a raw hue, so you can retheme your site by changing values here without touching any component code. The default palette is optimized for dark mode. Light mode overrides are described in Light mode overrides below.

Light mode overrides

tokens.modes.light.colors overrides any color token when the user’s system or site preference is set to light mode. You only need to list the tokens whose values differ from the dark defaults — unlisted tokens fall through to their dark-mode values. To add or change a light mode override, edit tokens.modes.light.colors in src/data/config/theme.json:
src/data/config/theme.json

Typography tokens

Typography tokens live under tokens.typography. They control the font families used for body text, monospace contexts, display headings, and the site wordmark.
OlonJS does not automatically load custom web fonts. Add your font imports to your global CSS or _document file and then reference them here by name.

Border radius

Border radius tokens live under tokens.borderRadius. Use these tokens in your custom components to stay visually consistent with the system.

Spacing

Spacing tokens live under tokens.spacing. They define the key layout dimensions used throughout the site shell.

Z-index

Z-index tokens live under tokens.zIndex. They establish a consistent stacking order so components never accidentally appear above layers they should sit behind.