Styling (24 themes + CSS variables)
ShipSaaS uses CSS custom properties for the entire design system, so theming is just a matter of changing a handful of --variable values. The catalog ships with 24 presets, and applyTheme() applies one at runtime without a rebuild.
How themes work
Colors are defined as --background, --foreground, --primary, --primary-foreground, --accent, --muted, and so on. The dark-mode variants use the same names, scoped to a .dark class on <html>.
:root {
--background: 0 0% 100%;
--foreground: 222 47% 11%;
--primary: 222 89% 55%;
/* ... */
}
.dark {
--background: 222 47% 6%;
--foreground: 0 0% 98%;
--primary: 217 91% 60%;
/* ... */
}Switching themes at runtime
applyTheme() from src/config/theme.ts writes a preset's HSL values to --primary, --accent, --ring, --gradient-primary, and --shadow-glow on <html>, and remembers the choice in localStorage:
import { applyTheme, THEME_PRESETS } from "@/config/theme";
applyTheme(THEME_PRESETS.blue);A ready-made dropdown (ThemeSwitcher) lives at src/components/playground/ui/ThemeSwitcher.tsx — try it on /playground. It is playground-scoped on purpose; copy it into your own layout or navbar if you want user-facing switching.
Adding a new theme
Each preset is a pair of HSL triples in src/config/theme.ts:
export const THEME_PRESETS: Record<string, ThemeConfig> = {
// ...
sunset: {
name: "Sunset",
primary: { h: 18, s: 95, l: 55 },
accent: { h: 320, s: 90, l: 60 },
},
};Or apply a one-off brand without adding a preset — applyTheme() accepts any shape with primary and accent triples:
applyTheme({
name: "My Brand",
primary: { h: 280, s: 100, l: 60 },
accent: { h: 290, s: 100, l: 65 },
});Dark mode
Dark variants for every token ship under a .dark class on <html>, and the Tailwind class strategy is already configured. Automatic system-preference flipping and a manual toggle are not included — when you need one, add a small client component that toggles the dark class.
Component playground
Visit /playground to browse all components and switch themes live.