Skip to content
GetUrUI

Theming

Every GetUrUI item is coloured by CSS custom properties. Change a token and every component follows — in both themes.

Dark and light

Dark is the default. Light is applied with an attribute — no class juggling, and it works on any element, not just <html>:

toggle.ts
1document.documentElement.setAttribute("data-theme", "light");

The theme-toggle component does this with a View Transition circle reveal and remembers the choice. To avoid a flash on load, set the attribute before paint with an inline script in <head>:

app/layout.tsx
1<script dangerouslySetInnerHTML={{ __html: `(function(){try{var t=localStorage.getItem("theme");if(t!=="light"&&t!=="dark"){t=matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"}document.documentElement.setAttribute("data-theme",t)}catch(e){}})()` }} />

Colour tokens

Each token is a CSS variable (--surface) and a Tailwind colour (bg-surface, text-surface, border-surface).

TokenUse
bgPage background
surfaceCards, frames, sidebar groups
surface-raisedPopovers, menus, palette, toasts, sheets
surface-sunkenCode blocks, inputs
surface-hoverHover wash on rows and ghost buttons
borderDecorative hairlines
border-strongControl borders (3:1 contrast)
inkPrimary text and icons
ink-mutedSecondary text
ink-subtleCaptions on bg and surface
voltSignature fill: primary buttons, active pills
volt-inkVolt as text, icon or focus ring
volt-softTinted ground for New badges, highlighted lines
on-voltText on volt
emberMoney and Pro: buy buttons, Pro badges
ember-inkEmber as text
success / warning / danger / infoStatus — always with an icon and a word
glass / scrimFrosted surfaces / overlay backdrop

Use your brand colour

Override the volt tokens in your stylesheet. Keep on-volt readable on the fill and give volt-ink a darker value in light mode so links stay above 4.5:1:

app/globals.css
1:root, [data-theme="dark"] {
2  --volt: #c9cff;
3  --volt-ink: #db4ff;
4  --volt-soft: #c9cff22;
5  --on-volt: #b0d1a;
6}
7[data-theme="light"] {
8  --volt-ink: #f4fd1;
9  --volt-soft: #c9cff33;
10}

Radius and shadow

Radii are rounded-xs 6px, rounded-sm 10px, rounded-md 14px, rounded-lg 20px, rounded-xl 28px and rounded-full. Shadows are shadow-sm, shadow-md, shadow-lg and shadow-glow (primary CTA hover only). Change them in the @theme block of geturui.css.

Per-section themes

Because tokens are scoped by attribute, a light card inside a dark page is one attribute away:

section.tsx
1<section data-theme="light" className="bg-bg text-ink">…</section>