# Design Tokens Quick Reference Quick lookup for all design tokens and standard patterns in SKiTCH Controller. --- ## Colors ### Semantic Colors ```css /* Primary - Blue (Actions, Branding) */ --color-primary: #2563eb; /* blue-600 */ --color-primary-light: #3b82f6; /* blue-500 */ --color-primary-dark: #1d4ed8; /* blue-700 */ /* Secondary - Slate (Secondary actions) */ --color-secondary: #64748b; /* slate-600 */ --color-secondary-light: #94a3b8; /* slate-400 */ /* Success - Green (Complete, Good) */ --color-success: #16a34a; /* green-600 */ --color-success-bg: #dcfce7; /* green-100 */ /* Warning - Amber (Wait, Caution) */ --color-warning: #d97706; /* amber-600 */ --color-warning-bg: #fef3c7; /* amber-100 */ /* Danger - Red (Errors, Destructive) */ --color-danger: #dc2626; /* red-600 */ --color-danger-bg: #fee2e2; /* red-100 */ /* Info - Cyan (Active, Information) */ --color-info: #0891b2; /* cyan-600 */ --color-info-bg: #cffafe; /* cyan-100 */ /* Neutral - Gray (Text, Borders) */ --color-neutral-50: #f9fafb; /* gray-50 - Subtle BG */ --color-neutral-100: #f3f4f6; /* gray-100 - Card BG */ --color-neutral-200: #e5e7eb; /* gray-200 - Borders */ --color-neutral-300: #d1d5db; /* gray-300 - Disabled BG */ --color-neutral-600: #4b5563; /* gray-600 - Secondary text */ --color-neutral-900: #111827; /* gray-900 - Primary text */ ``` ### Usage Guide | Token | Use For | Example | |-------|---------|---------| | `primary` | Main actions, links, current state | Connect, Upload, Start buttons | | `secondary` | Less important actions | Mask Trace, secondary buttons | | `success` | Completed states, positive feedback | Sewing complete, upload success | | `warning` | Waiting states, cautions | Color change wait, pause | | `danger` | Errors, destructive actions | Delete, disconnect, errors | | `info` | Active states, information | Sewing in progress, informational messages | | `neutral-900` | Primary text | Headings, body text | | `neutral-600` | Secondary text | Labels, helper text | | `neutral-300` | Borders, disabled states | Card borders, disabled buttons | | `neutral-100` | Backgrounds | Card backgrounds | | `neutral-50` | Subtle backgrounds | Component backgrounds | --- ## Typography ### Text Sizes ```tsx // Headings h1: "text-2xl font-bold text-neutral-900" // 24px - Main title h2: "text-xl font-semibold text-neutral-900" // 20px - Section titles h3: "text-base font-semibold text-neutral-900" // 16px - Subsections h4: "text-sm font-semibold text-neutral-700" // 14px - Small headings // Body Text text-base: 16px // Large body text, important info text-sm: 14px // Standard body text (MINIMUM) text-xs: 12px // Small text, captions text-[11px]: 11px // Very small (use sparingly) // Line Heights leading-tight: 1.25 // Headings leading-normal: 1.5 // Body text leading-relaxed: 1.625 // Comfortable reading ``` ### Font Weights ```tsx font-normal: 400 // Regular text font-medium: 500 // Emphasis font-semibold: 600 // Headings, labels font-bold: 700 // Main headings, important ``` ### Usage Examples ```tsx // Page title
Description text...
// Label File Name // Value pattern.pes ``` --- ## Spacing ### Padding Scale ```tsx p-2: 0.5rem (8px) // Tight p-3: 0.75rem (12px) // Compact p-4: 1rem (16px) // Standard p-5: 1.25rem (20px) // Comfortable p-6: 1.5rem (24px) // Spacious p-8: 2rem (32px) // Very spacious ``` ### Gap Scale ```tsx gap-1: 0.25rem (4px) // Very tight gap-2: 0.5rem (8px) // Tight grouping gap-3: 0.75rem (12px) // Related items gap-4: 1rem (16px) // Section spacing gap-6: 1.5rem (24px) // Major sections gap-8: 2rem (32px) // Large gaps ``` ### Margin Scale ```tsx mb-2: 0.5rem (8px) // Tight mb-3: 0.75rem (12px) // Compact mb-4: 1rem (16px) // Standard mb-5: 1.25rem (20px) // Comfortable mb-6: 1.5rem (24px) // Spacious mb-8: 2rem (32px) // Large gap ``` ### Standard Component Spacing ```tsx // Card padding "p-6" // Standard card (24px) "p-5" // Compact card (20px) "p-4" // Small card (16px) // Content stacking "space-y-2" // Tight grouping (8px) "space-y-3" // Related items (12px) "space-y-4" // Section spacing (16px) "space-y-6" // Major sections (24px) // Grid gaps "gap-3" // Tight grid (12px) "gap-4" // Standard grid (16px) "gap-6" // Spacious grid (24px) ``` --- ## Buttons ### Primary Button (Main Actions) ```tsx className=" px-6 py-3 bg-primary text-white rounded-lg font-semibold text-sm shadow-sm hover:bg-primary-light hover:shadow-md hover:scale-[1.02] active:bg-primary-dark active:scale-[0.98] focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 disabled:bg-neutral-300 disabled:text-neutral-500 disabled:cursor-not-allowed disabled:shadow-none transition-all duration-150 ease-in-out cursor-pointer " ``` **Use for:** Connect, Upload, Start Sewing, Resume --- ### Secondary Button (Less Important Actions) ```tsx className=" px-6 py-3 bg-white text-neutral-700 border border-neutral-300 rounded-lg font-semibold text-sm shadow-sm hover:bg-neutral-50 hover:border-neutral-400 active:bg-neutral-100 active:scale-[0.98] focus:outline-none focus:ring-2 focus:ring-neutral-400 focus:ring-offset-2 disabled:bg-neutral-50 disabled:text-neutral-400 disabled:cursor-not-allowed transition-all duration-150 cursor-pointer " ``` **Use for:** Mask Trace, Refresh, Cancel --- ### Danger Button (Destructive Actions) ```tsx className=" px-6 py-3 bg-danger text-white rounded-lg font-semibold text-sm shadow-sm hover:bg-red-700 hover:shadow-md active:bg-red-800 active:scale-[0.98] focus:outline-none focus:ring-2 focus:ring-danger focus:ring-offset-2 disabled:bg-neutral-300 disabled:text-neutral-500 disabled:cursor-not-allowed disabled:shadow-none transition-all duration-150 cursor-pointer " ``` **Use for:** Delete, Disconnect --- ### Icon Button (Zoom, Controls) ```tsx className=" w-10 h-10 flex items-center justify-center bg-white border border-neutral-300 rounded-lg text-neutral-700 hover:bg-primary hover:text-white hover:border-primary active:bg-primary-dark active:scale-95 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 transition-all duration-150 cursor-pointer " aria-label="Descriptive label" ``` **Use for:** Zoom in/out/reset, small controls --- ## Cards & Containers ### Standard Card ```tsxMessage
Message
Message
Message