Menu
Docs

Customize

Everything visual is a CSS variable, so most changes are one line.

Colours

Override any of these on :root, or on a single element to recolour just that part of the page.

VariableDefault
--gl-base#05070b
--gl-surface#10151e
--gl-content#f2f5f9
--gl-muted#a3acba
--gl-border#ffffff1f
--gl-primary#f5a05a
--gl-secondary#3b9ef5
--gl-success#3ddc97
--gl-warning#f5c84b
--gl-danger#f5605a
--gl-on-accent#0a0d12
CSS
:root {
  --gl-primary: #e8b45a;   /* gold */
  --gl-secondary: #2f9aa0; /* teal */
}

Light and dark

Glimmer is dark by default. Add data-theme="light" for glass over a light page, or data-theme="auto" to follow the visitor's system setting. It works on <html> or on any element, so one section can differ from the rest. Try the Light switch in the navbar.

HTML
<html data-theme="auto">
VariableLight value
--gl-base#f2f4f8
--gl-surface#ffffff
--gl-content#0e1420
--gl-muted#566070
--gl-border#0000001f

One component, one colour

Each coloured component reads its colour from --c. Set it inline for a one-off that the five suffixes don't cover.

HTML
<span class="badge" style="--c: #c58cff">Beta</span>

Corners

Three sizes: --gl-radius-sm (6px), --gl-radius-md (10px) and --gl-radius-lg (14px).

Frost

Set how frosted the glass is with frost-1 to frost-5, on <html> for everything or on one surface. Try the slider in the navbar, or see Frost.

HTML
<html class="frost-2">

Fonts

Text uses --gl-font and labels use --gl-mono. Point them at any font you have loaded. The kit's own fonts are an optional import; see Install.

CSS
:root {
  --gl-font: "Inter", system-ui, sans-serif;
  --gl-mono: "JetBrains Mono", ui-monospace, monospace;
}

Changing the source

If you work on Glimmer itself, the defaults live in tokens.json. The build regenerates the CSS variables and the Swift constants together, so the web and Apple kits never drift apart, and then the prefixed and Tailwind builds of the CSS.

Terminal
npm run build