# shadcn/ui Design Skill for QwenClaw ## Overview This skill provides **shadcn/ui design patterns and component knowledge** to QwenClaw, enabling it to generate beautiful, accessible, and production-ready UI components using the shadcn/ui design system. **Source:** https://github.com/shadcn/ui --- ## What is shadcn/ui? **shadcn/ui** is a set of beautifully designed, customizable UI components built with: - **React** - Component framework - **Tailwind CSS** - Styling - **Radix UI** - Accessible primitives - **TypeScript** - Type safety ### Key Principles - **Open Code** - Copy/paste components into your project - **Customizable** - Full control over styles and behavior - **Accessible** - WCAG compliant components - **Modern** - Built with latest React patterns --- ## Components Available ### Forms & Input - **Form** - Form container with validation - **Input** - Text input fields - **Textarea** - Multi-line text input - **Checkbox** - Checkbox with labels - **Radio Group** - Radio button groups - **Select** - Dropdown selection - **Switch** - Toggle switch - **Slider** - Range slider - **Label** - Form labels ### Navigation - **Button** - Button variants (default, secondary, outline, ghost, link) - **Link** - Styled links - **Tabs** - Tab navigation - **Dropdown Menu** - Context menus - **Navigation Menu** - Main navigation - **Pagination** - Pagination controls - **Breadcrumb** - Breadcrumb navigation ### Feedback - **Alert** - Status messages - **Toast** - Toast notifications - **Progress** - Progress indicators - **Skeleton** - Loading skeletons - **Spinner** - Loading spinners - **Badge** - Status badges ### Data Display - **Card** - Card containers - **Table** - Data tables - **Avatar** - User avatars - **Calendar** - Date picker - **Command** - Command palette (cmd+k) ### Overlays - **Dialog** - Modal dialogs - **Sheet** - Side sheets - **Popover** - Popover overlays - **Tooltip** - Hover tooltips - **Hover Card** - Hover previews ### Layout - **Separator** - Visual dividers - **Scroll Area** - Custom scrollbars - **Resizable** - Resizable panels - **Aspect Ratio** - Maintain aspect ratios --- ## Usage in QwenClaw ### Basic Component Generation ``` Use shadcn/ui skill to create a login form with: - Email input - Password input - Remember me checkbox - Submit button - Forgot password link ``` ### Complex UI Generation ``` Use shadcn/ui patterns to build a dashboard with: - Sidebar navigation - Header with user menu - Stats cards - Recent activity table - Theme toggle ``` ### Component Customization ``` Generate a shadcn/ui button with: - Primary variant - Large size - Custom color: blue-600 - Icon: ArrowRight ``` --- ## Design Tokens ### Colors ``` Background: bg-background Foreground: text-foreground Primary: bg-primary / text-primary Secondary: bg-secondary / text-secondary Muted: bg-muted / text-muted Accent: bg-accent / text-accent Destructive: bg-destructive / text-destructive ``` ### Typography ``` font-sans - Inter font family text-xs/sm/base/lg/xl/2xl - Font sizes font-normal/medium/semibold/bold - Font weights ``` ### Spacing ``` p-4 - Padding m-4 - Margin gap-4 - Gap w-full - Width h-full - Height ``` ### Border Radius ``` rounded - Default (0.5rem) rounded-md - Medium (0.375rem) rounded-lg - Large (0.5rem) rounded-xl - Extra large (0.75rem) rounded-full - Full circle ``` --- ## Component Patterns ### Form Pattern ```tsx
``` ### Card Pattern ```tsx