--- name: ui-design-styling description: Design and style UI components for ryOS following the 4 OS themes (System 7, macOS Aqua, Windows XP, Windows 98). Use when creating UI components, styling elements, working with themes, adding visual effects, or implementing retro OS aesthetics. --- # ryOS UI Design & Styling ## The 4 Themes | Theme | ID | Key Traits | |-------|-----|------------| | System 7 | `system7` | Black/white, square corners, Chicago font, dotted patterns | | macOS Aqua | `macosx` | Pinstripes, traffic lights, glossy buttons, Lucida Grande | | Windows XP | `xp` | Blue gradients, Luna style, soft shadows, Tahoma | | Windows 98 | `win98` | Gray 3D bevels, classic blue title bars, MS Sans Serif | ## Essential Utilities ```tsx import { cn } from "@/lib/utils"; import { useTheme } from "@/contexts/ThemeContext"; const { osTheme } = useTheme(); // Theme-conditional classes className={cn( "base-classes", osTheme === "macosx" && "aqua-specific", osTheme === "system7" && "system7-specific" )} ``` ## OS-Aware Tailwind Classes ```tsx className="bg-os-window-bg" // Window background className="border-os-window" // Window border className="rounded-os" // Theme-appropriate radius className="font-os-ui" // UI font stack className="font-os-mono" // Monospace font className="shadow-os-window" // Window shadow className="h-os-titlebar" // Title bar height ``` ## CSS Variables Access via `var(--name)`: ```css --os-font-ui, --os-font-mono --os-color-window-bg, --os-color-window-border --os-color-titlebar-active-bg, --os-color-titlebar-inactive-bg --os-color-button-face, --os-color-button-highlight, --os-color-button-shadow --os-color-selection-bg, --os-color-selection-text --os-metrics-border-width, --os-metrics-radius --os-metrics-titlebar-height, --os-metrics-menubar-height ``` --- ## Theme-Specific Styling ### System 7 ```tsx
``` ### macOS Aqua ```tsx
``` ### Windows XP ```tsx
``` ### Windows 98 ```tsx
``` --- ## Theme Specifications ### System 7 (`system7`) | Property | Value | |----------|-------| | Fonts | Chicago, Monaco (mono) | | Window BG | `#FFFFFF` | | Border | `2px solid #000000` | | Radius | `0px` | | Selection | Black bg, white text | | Shadow | `2px 2px 0px 0px rgba(0,0,0,0.5)` | ### macOS Aqua (`macosx`) | Property | Value | |----------|-------| | Fonts | Lucida Grande, Monaco (mono) | | Window BG | `#E8E8E8` | | Border | `0.5px solid rgba(0,0,0,0.3)` | | Radius | `0.45rem` (8px) | | Selection | `#3875D7` bg, white text | | Shadow | `0 3px 10px rgba(0,0,0,0.3)` | | Traffic Lights | Red `#FF5F57`, Yellow `#FEBC2E`, Green `#28C840` | ### Windows XP (`xp`) | Property | Value | |----------|-------| | Fonts | Tahoma, Consolas (mono) | | Window BG | `#ECE9D8` | | Border | `3px solid #0054E3` | | Radius | `0.5rem` (8px) | | Selection | `#316AC5` bg, white text | | Shadow | `0 4px 8px rgba(0,0,0,0.25)` | | Title Bar | Blue gradient `#0A246A` → `#0054E3` | ### Windows 98 (`win98`) | Property | Value | |----------|-------| | Fonts | MS Sans Serif, Fixedsys (mono) | | Window BG | `#C0C0C0` | | Raised Bevel | `border: 2px solid; border-color: #FFF #808080 #808080 #FFF` | | Sunken Bevel | `border: 2px solid; border-color: #808080 #FFF #FFF #808080` | | Radius | `0px` | | Selection | `#000080` bg, white text | | Title Bar | Gradient `#000080` → `#1084D0` | --- ## Component Patterns ### Theme-Adaptive Button ```tsx import { Button } from "@/components/ui/button"; ``` ### Aqua Buttons (CSS classes) ```tsx ``` ### Win98 3D Button ```tsx