The gadget-ui design system is built on CSS custom properties that define a semantic color palette, typography, shadows, and border radius. Themes are switched by changing theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/aurelienbobenrieth/gadget/llms.txt
Use this file to discover all available pages before exploring further.
data-theme attribute on the root element.
Color system
All colors are defined as CSS custom properties inglobals.css. The Tailwind preset maps Tailwind class names to these properties.
Accent colors
The primary brand color is electric blue (#4242fc), inspired by Gadget’s visual identity.
| Token | CSS Variable | Dark Value | Light Value | Usage |
|---|---|---|---|---|
accent | --accent | #4242fc | #4242fc | Primary actions, links |
accent-deep | --accent-deep | #2828a0 | #2828a0 | Gradient stops, hover states |
accent-foreground | --accent-foreground | #ffffff | #ffffff | Text on accent backgrounds |
accent-muted | --accent-muted | #3d3580 | #ececff | Subtle accent backgrounds |
Surface colors
Layered backgrounds for cards, modals, and overlays.| Token | CSS Variable | Dark Value | Light Value | Usage |
|---|---|---|---|---|
background | --background | #0a0a0f | #f8f8f9 | Page background |
surface | --surface | #111118 | #ffffff | Card backgrounds |
surface-raised | --surface-raised | #17171f | #f6f6f6 | Elevated cards, buttons |
surface-overlay | --surface-overlay | #1e1e28 | #eee | Modals, dropdowns, popovers |
Text colors
Semantic foreground colors for readability hierarchy.| Token | CSS Variable | Dark Value | Light Value | Usage |
|---|---|---|---|---|
foreground | --foreground | #f2f2f5 | #1f1f1f | Primary text |
muted-foreground | --muted-foreground | #8888a0 | #545454 | Secondary text, labels |
subtle-foreground | --subtle-foreground | #55556a | #757575 | Placeholder text, hints |
Border colors
| Token | CSS Variable | Dark Value | Light Value | Usage |
|---|---|---|---|---|
border | --border | #2a2a38 | #e2e2e2 | Standard borders |
border-subtle | --border-subtle | #1e1e28 | #eee | Subtle dividers, outlines |
Semantic colors
Status indicators for success, error, warning states.| Token | CSS Variable | Dark Value | Light Value | Usage |
|---|---|---|---|---|
success | --success | #22c55e | #16a34a | Success messages, badges |
success-muted | --success-muted | #14532d | #dcfce7 | Success backgrounds |
destructive | --destructive | #ef4444 | #dc2626 | Error messages, delete buttons |
destructive-muted | --destructive-muted | #450a0a | #fee2e2 | Error backgrounds |
warning | --warning | #f59e0b | #d97706 | Warning messages, badges |
warning-muted | --warning-muted | #451a03 | #fef3c7 | Warning backgrounds |
info | --info | #4242fc | #4242fc | Info messages, tips |
Typography
Two font families are included: Inter for UI text and Inconsolata for code.Font families
| Token | CSS Variable | Stack | Usage |
|---|---|---|---|
font-sans | --font-sans | ”Inter Variable”, “Inter”, Helvetica, Arial, sans-serif | UI text, headings |
font-mono | --font-mono | ”Inconsolata”, Menlo, Monaco, Consolas, monospace | Code blocks, inline code |
Font loading
Fonts are loaded via @fontsource when you import global styles:Border radius
Rounded corners use a 6px base with three modifiers.| Token | CSS Variable | Value | Usage |
|---|---|---|---|
radius | --radius | 6px | Default rounded corners |
radius-sm | --radius-sm | 4px | Subtle rounding (badges) |
radius-lg | --radius-lg | 10px | Prominent rounding (cards) |
radius-full | --radius-full | 9999px | Fully rounded (pills) |
Shadows
Neo-skeuomorphic shadows with inset highlights and ambient shadows.| Token | CSS Variable | Usage |
|---|---|---|
shadow-button | --shadow-button | Standard button depth |
shadow-button-accent | --shadow-button-accent | Accent button with glow |
shadow-card | --shadow-card | Card elevation |
shadow-raised | --shadow-raised | Modal, dropdown elevation |
Theme switching
Toggle between dark and light modes by setting thedata-theme attribute on the root element (or any parent container).
Default theme
Dark mode is the default. No attribute is required:Switching themes
Setdata-theme="light" to activate light mode:
React example
Manage theme state and apply to a container:ThemeToggle.tsx
Persist theme preference
Store the theme in localStorage:useTheme.ts
App.tsx
Customizing tokens
Override CSS variables to customize the design system:custom.css
globals.css
Component variants
Many components use design tokens viaclass-variance-authority. For example, the Button component:
Button component (excerpt)
Next steps
Setup
Configure Tailwind and import global styles
Components
Browse available components and variants
