Privacy-friendly analytics only with consent. No ads, no cross-site tracking. Read the privacy policy.
Customize Slipstream UI to match your brand with the theming system.
Default, Violet, and Zinc presets below are applied through CSS variables in real time — no rebuilds, no screenshots.
One createTheme() call emits every CSS variable - components re-theme instantly, no rebuild. Each preset ships a dark variant that follows the site's .dark class.
Slipstream UI uses CSS variables for theming, making it easy to customize colors, spacing, and other design tokens. The theming system is built on HSL color values for easy manipulation and consistent results.
The createTheme() function lets you create custom themes from brand colors:
import { createTheme } from '@slipstream-ui/themes'const customTheme = createTheme({brandColor: '224 89% 58%', // HSL valuesborderRadius: '0.5rem',darkMode: false})
Slipstream UI includes several preset themes:
import { defaultTheme } from '@slipstream-ui/themes'
import { darkTheme } from '@slipstream-ui/themes'
import { zincTheme, zincDarkTheme } from '@slipstream-ui/themes'
import { violetTheme, violetDarkTheme } from '@slipstream-ui/themes'
The theme system uses CSS variables that you can override in your global CSS:
:root {--background: 0 0% 100%;--foreground: 222 85% 7%;--primary: 224 89% 58%;--primary-foreground: 0 0% 100%;--secondary: 214 45% 96%;--secondary-foreground: 222 47% 11%;--muted: 214 40% 96%;--muted-foreground: 219 12% 42%;--accent: 214 45% 96%;--accent-foreground: 222 47% 11%;--destructive: 348 68% 44%;--destructive-foreground: 0 0% 100%;--border: 214 28% 89%;--input: 214 28% 89%;--ring: 224 89% 58%;--radius: 0.375rem;}.dark {--background: 220 6% 7%;--card: 220 5% 10%;--foreground: 220 9% 95%;--primary: 224 90% 70%;--primary-foreground: 220 30% 8%;--border: 220 6% 20%;--input: 220 6% 25%;/* ... and so on */}
To enable dark mode, add the dark class to a parent element (typically the html or body tag):
// Toggle dark modedocument.documentElement.classList.toggle('dark')
When creating a custom theme, provide your brand color in HSL format:
// Convert your brand color to HSL// Example: #3B82F6 (blue) → 217 91% 60%const brandTheme = createTheme({brandColor: '217 91% 60%',borderRadius: '0.75rem'})
You can use online tools or CSS to convert your brand colors to HSL:
/* In CSS */:root {--brand: 217 91% 60%; /* #3B82F6 */}
Components use a small, documented ladder instead of ad-hoc numbers. Extend it rather than inventing new values — stacking bugs come from stray z-[500]s.
| Layer | Value | Used by |
|---|---|---|
| Docked / in-page | z-10 | Sticky toolbars inside a page section |
| Sticky headers | z-30 | AppShell header, table headers |
| Site chrome | z-40 | Marketing navbar, doc banner |
| Overlays | z-50 | Dialog, Drawer, Menu, Popover, Tooltip, Autocomplete listbox |
| Notifications | z-60 | Toaster — always above overlays |
Keep app-level chrome at or below 60. If a page needs a higher layer (onboarding tours, devtools), reserve a single documented value instead of escalating per component.