Capsa ships four theme styles, each with light and dark modes:
| Style | Look |
|---|---|
steel | Silver/metallic, steel-blue accent (default) |
aurora | Purple, dark-first |
retro | Warm, hard shadows, sharp corners |
shadcn | Slate, minimal (shadcn/ui palette) |
Users switch via the gear menu in the top bar (mode + style).
For a single-brand site, lock one style and hide the switcher:
Mode (light/dark/system) still works; only the style picker is hidden.
Colors are theme tokens, never hardcoded hex. Components reference tokens
like $accent, $color10, $borderColor (resolved at runtime via Tamagui), so
switching themes recolors the whole UI — including code blocks, callouts, and the
command palette.
Themes live in src/theme/themes.ts and are registered in
src/theme/themeController.tsx.
The fastest path is to clone an existing style and recolor it.
Copy a preset block in themes.ts — the steel block is a good neutral
starting point. Duplicate its palette and semantic-color objects, renaming
steel* → brand*:
Register it in the childrenThemes of the createThemes({...}) call:
Register the name in src/theme/themeController.tsx — add 'brand' to
the ThemeStyle union and the THEME_STYLES array (the Tamagui theme names
derive from those automatically) — and to the styles array in the
pre-hydration script in index.html, so the theme applies before first
paint with no flash.
List it in the style switcher — styleOptions in
src/components/layout/TopNav.tsx.
Pin it with VITE_DEFAULT_THEME_STYLE=brand.
Tip
Start from the closest existing preset and change only the accent + neutral palettes. The ~50 semantic tokens mostly cascade from those.
The body/heading font is Space Grotesk, loaded and configured entirely in
src/theme/fonts.ts (the @fontsource weight imports live there too). Swap it
by changing that one file — import your font's weight files and update
createFont.