Theme & tokens

Every visual value in Joy runs through CSS custom properties. Override a token after loading joy-tokens.css and the whole system — buttons, cards, dock, modal — picks up the change.

Color

--joy-accent#cd0000
--joy-accent-hover#a30000
--joy-bgpage background
--joy-surfacecard background
--joy-textprimary text
--joy-text-mutedsecondary text

To use your own brand color, override the accent tokens. Anything using var(--joy-accent) — solid buttons, active links, the selected dock item, input focus rings — updates with it:

HTML
:root {
    --joy-accent: #6d28d9;
    --joy-accent-hover: #5b21b6;
    --joy-accent-glow: rgba(109, 40, 217, 0.35);
    --joy-accent-soft: rgba(109, 40, 217, 0.1);
}

This block needs to load after the joy-tokens.css <link> in your <head> order (or in any CSS loaded after it) — otherwise the original token wins.

Spacing scale

TokenValue
--joy-space-14px
--joy-space-28px
--joy-space-312px
--joy-space-416px
--joy-space-524px
--joy-space-632px
--joy-space-748px
--joy-space-864px

Border radius

TokenValue
--joy-radius-sm14px
--joy-radius-md20px
--joy-radius-lg28px
--joy-radius-xl40px
--joy-radius-pill999px

Easing

TokenValueUsed for
--joy-easecubic-bezier(0.25, 0.8, 0.25, 1)Default transitions
--joy-ease-bouncecubic-bezier(0.175, 0.885, 0.32, 1.275)Hover/click bounce (buttons, dock)

Dark mode

joy-dark.css is a second stylesheet, always loaded but disabled by default. It redefines the same color/glass variables and never touches layout, so turning it on never changes structure — just the values those tokens already hold.

ActionHow
Togglewindow.JoyTheme.toggle() — or click a button with id="joy-theme-toggle", which joy.js wires up on its own
Force a themewindow.JoyTheme.apply('dark') or .apply('light')
Persistencesaved to localStorage['selectedTheme'], read automatically on the next visit
No saved choicefalls back to the OS prefers-color-scheme

Font

Everything uses --joy-font: 'Poppins', sans-serif;. To swap it, override the token and load whichever font you prefer instead of the Google Fonts link (see Getting started).