1---2name: design-system3description: SKILL — Design System4---5# SKILL — Design System67Pixel's comprehensive design system architecture. Every design must conform to these tokens, components, and patterns.89---1011## Design Tokens1213### Colors1415#### Semantic Colors16| Token | Purpose | Usage |17|-------|---------|-------|18| `primary` | Main brand action | Buttons, links, active states |19| `secondary` | Supporting actions | Secondary buttons, tags |20| `accent` | Highlight, emphasis | Badges, notifications, callouts |21| `destructive` | Danger, deletion | Delete buttons, error states |22| `success` | Confirmation, positive | Success messages, checkmarks |23| `warning` | Caution | Warning banners, alerts |24| `info` | Informational | Info tooltips, help text |2526#### Neutral Scale27| Token | Value | Usage |28|-------|-------|-------|29| `background` | Brand-specific | Page background |30| `foreground` | Brand-specific | Primary text |31| `muted` | Brand-specific | Disabled text, placeholders |32| `muted-foreground` | Brand-specific | Secondary text on muted backgrounds |33| `border` | Brand-specific | Dividers, input borders |34| `card` | Brand-specific | Card backgrounds |35| `card-foreground` | Brand-specific | Text on cards |36| `popover` | Brand-specific | Dropdown/popover backgrounds |3738See the `brand-systems` skill for brand-specific color values.3940### Typography4142| Token | Size | Weight | Line Height | Usage |43|-------|------|--------|-------------|-------|44| `display` | 48px / 3rem | 700 | 1.1 | Hero headings only |45| `h1` | 36px / 2.25rem | 700 | 1.2 | Page titles |46| `h2` | 30px / 1.875rem | 600 | 1.25 | Section headings |47| `h3` | 24px / 1.5rem | 600 | 1.3 | Subsection headings |48| `h4` | 20px / 1.25rem | 600 | 1.35 | Card titles |49| `body-lg` | 18px / 1.125rem | 400 | 1.6 | Emphasis body text |50| `body` | 16px / 1rem | 400 | 1.5 | Default body text |51| `body-sm` | 14px / 0.875rem | 400 | 1.5 | Secondary text, captions |52| `caption` | 12px / 0.75rem | 400 | 1.4 | Labels, metadata |53| `micro` | 10px / 0.625rem | 500 | 1.2 | Badges, tags (use sparingly) |5455### Spacing (4px Grid)5657All spacing values must be multiples of 4px.5859| Token | Value | Usage |60|-------|-------|-------|61| `space-1` | 4px | Tight inline spacing, icon-to-text gap |62| `space-2` | 8px | Compact element spacing, input padding |63| `space-3` | 12px | Related item spacing |64| `space-4` | 16px | Default element spacing, card padding |65| `space-5` | 20px | Comfortable spacing |66| `space-6` | 24px | Section sub-spacing |67| `space-8` | 32px | Section spacing |68| `space-10` | 40px | Large section gaps |69| `space-12` | 48px | Page section spacing |70| `space-16` | 64px | Major section breaks |71| `space-20` | 80px | Hero spacing |72| `space-24` | 96px | Maximum section spacing |7374### Border Radius7576| Token | Value | Usage |77|-------|-------|-------|78| `radius-sm` | 4px | Badges, tags, small elements |79| `radius-md` | 8px | Buttons, inputs, cards |80| `radius-lg` | 12px | Modals, large cards |81| `radius-xl` | 16px | Feature cards, hero elements |82| `radius-full` | 9999px | Avatars, pills, circular elements |8384### Shadows8586| Token | Value | Usage |87|-------|-------|-------|88| `shadow-sm` | `0 1px 2px rgba(0,0,0,0.05)` | Subtle elevation, inputs |89| `shadow-md` | `0 4px 6px rgba(0,0,0,0.1)` | Cards, dropdowns |90| `shadow-lg` | `0 10px 15px rgba(0,0,0,0.15)` | Modals, popovers |91| `shadow-xl` | `0 20px 25px rgba(0,0,0,0.2)` | Full-screen overlays |9293Note: In dark themes, shadows are less effective. Use border + background contrast instead.9495### Breakpoints9697| Token | Value | Usage |98|-------|-------|-------|99| `mobile` | 0–639px | Mobile-first base styles |100| `sm` | 640px | Large phones, small tablets |101| `md` | 768px | Tablets |102| `lg` | 1024px | Small desktops, landscape tablets |103| `xl` | 1280px | Standard desktops |104| `2xl` | 1536px | Large desktops |105106---107108## Components109110### Buttons111112#### Variants113| Variant | Usage |114|---------|-------|115| `primary` | Main action — one per screen section |116| `secondary` | Supporting action |117| `outline` | Tertiary action, less emphasis |118| `ghost` | Inline action, minimal emphasis |119| `destructive` | Delete, remove, dangerous actions |120| `link` | Inline text action |121122#### Sizes123| Size | Height | Padding | Font |124|------|--------|---------|------|125| `sm` | 32px | 12px horizontal | 14px |126| `md` | 40px | 16px horizontal | 14px |127| `lg` | 48px | 24px horizontal | 16px |128129#### States (Required for ALL buttons)130- **Default** — Resting state131- **Hover** — Cursor over (desktop only)132- **Active/Pressed** — Being clicked/tapped133- **Focus** — Keyboard focus ring (2px offset, brand color)134- **Disabled** — Reduced opacity (0.5), no pointer events135- **Loading** — Spinner replaces text, maintains button width136137### Inputs138139#### Types140- Text input (single line)141- Textarea (multi-line)142- Select / dropdown143- Checkbox144- Radio145- Toggle / switch146- Date picker147- File upload148149#### States (Required for ALL inputs)150- **Default** — Empty, resting151- **Focused** — Active border, label animation152- **Filled** — Contains value153- **Error** — Red border, error message below154- **Disabled** — Reduced opacity, no interaction155- **Read-only** — Visible value, no interaction156157#### Rules158- Always include labels (never placeholder-only)159- Error messages appear below the input, not in tooltips160- Group related inputs with clear sections161- Min height for touch: 44px162163### Cards164165#### Anatomy166- Container (background, border, radius, optional shadow)167- Header (optional — title, subtitle, action)168- Content (primary card content)169- Footer (optional — actions, metadata)170171#### Rules172- Consistent padding: 16px minimum, 24px recommended173- Cards in a grid must be equal height (use flexbox/grid)174- Clickable cards need hover state and cursor pointer175- Don't nest cards inside cards176177### Navigation178179#### Web180- Top navigation bar for primary navigation181- Sidebar for complex applications (dashboards)182- Breadcrumbs for deep hierarchies183- Tabs for same-page content switching184185#### Mobile186- Bottom tab bar for primary navigation (max 5 items)187- Stack navigation for drill-down flows188- Modal for focused tasks189- Bottom sheet for contextual actions190- NEVER use hamburger menus191192### Feedback193194| Type | Usage | Duration |195|------|-------|----------|196| Toast | Non-critical confirmation | 3-5 seconds, auto-dismiss |197| Alert banner | Important, persistent info | Until dismissed or resolved |198| Inline error | Field-level validation | Until corrected |199| Modal dialog | Critical confirmation | Until user responds |200| Progress bar | Long operations | Until complete |201| Skeleton | Content loading | Until content loads |202203### Data Display204205| Component | Usage |206|-----------|-------|207| Table | Structured, comparable data |208| List | Sequential items |209| Grid | Visual items (products, media) |210| Chart | Trends, comparisons, distributions |211| Stat card | Key metrics, KPIs |212| Timeline | Chronological events |213214---215216## Patterns217218### Form Patterns219- Single column forms for simplicity220- Progressive disclosure for complex forms221- Inline validation on blur222- Submit button at bottom-right (web) or full-width (mobile)223- Clear vs. cancel — "Cancel" returns, "Clear" resets224225### Search Patterns226- Search input with icon227- Instant results (debounced)228- Recent searches229- Empty state for no results230- Filter chips for refinement231232### Authentication Patterns233- Email + password (primary)234- Social login buttons (secondary)235- Magic link (optional)236- Password requirements shown during creation237- Error messages must not leak user existence238239---240241## Design System Rules2422431. **Every component must use design tokens** — No hardcoded colors, sizes, or spacing2442. **Every interactive element must have all states defined** — No missing hover, focus, disabled2453. **Every screen must handle all edge states** — See edge-state-design skill2464. **Typography must follow the type scale** — No arbitrary font sizes2475. **Spacing must follow the 4px grid** — No arbitrary pixel values2486. **Colors must meet WCAG AA contrast** — Minimum 4.5:1 for text, 3:1 for large text2497. **Touch targets must be 44px minimum** — On both web and mobile2508. **Animations must respect prefers-reduced-motion** — Always provide static fallback2519. **Components must be consistent across screens** — Same component, same behavior everywhere25210. **Dark theme is the default** — All our brands use dark themes. Design dark-first.253254### Dark Theme Specifics255- Use elevated surface colors instead of shadows for depth256- Reduce image brightness/saturation slightly257- Ensure sufficient contrast between surface layers258- Primary colors may need lightened variants for dark backgrounds259- Avoid pure white (#FFFFFF) text — use off-white (#E5E7EB or similar)260- Avoid pure black (#000000) backgrounds — use near-black with slight color