# Component Library ## One-Liner **A comprehensive collection of reusable UI components built with Radix UI primitives and Tailwind CSS, following shadcn/ui patterns for consistent, accessible, and customizable interfaces.** --- ## Overview **Location**: `ccw/frontend/src/components/ui/` **Purpose**: Provides a consistent set of UI components for building the CCW frontend application. **Technology Stack**: - **Radix UI**: Unstyled, accessible component primitives - **Tailwind CSS**: Utility-first styling with custom theme - **class-variance-authority (CVA)**: Type-safe variant prop management - **Lucide React**: Consistent iconography --- ## Live Demo: Component Gallery :::demo ComponentGallery # component-gallery.tsx /** * Component Gallery Demo * Interactive showcase of all UI components */ export function ComponentGallery() { const [selectedCategory, setSelectedCategory] = React.useState('all') const [buttonVariant, setButtonVariant] = React.useState('default') const [switchState, setSwitchState] = React.useState(false) const [checkboxState, setCheckboxState] = React.useState(false) const [selectedTab, setSelectedTab] = React.useState('variants') const categories = [ { id: 'all', label: 'All Components' }, { id: 'buttons', label: 'Buttons' }, { id: 'forms', label: 'Forms' }, { id: 'feedback', label: 'Feedback' }, { id: 'navigation', label: 'Navigation' }, { id: 'overlays', label: 'Overlays' }, ] const components = { buttons: [ { name: 'Button', variants: ['default', 'destructive', 'outline', 'secondary', 'ghost', 'link', 'gradient'] }, ], forms: [ { name: 'Input', type: 'text' }, { name: 'Textarea', type: 'textarea' }, { name: 'Select', type: 'select' }, { name: 'Checkbox', type: 'checkbox' }, { name: 'Switch', type: 'switch' }, ], feedback: [ { name: 'Badge', variants: ['default', 'secondary', 'success', 'warning', 'destructive'] }, { name: 'Progress', type: 'progress' }, { name: 'Alert', type: 'alert' }, ], navigation: [ { name: 'Tabs', type: 'tabs' }, { name: 'Breadcrumb', type: 'breadcrumb' }, ], overlays: [ { name: 'Dialog', type: 'dialog' }, { name: 'Drawer', type: 'drawer' }, { name: 'Dropdown', type: 'dropdown' }, ], } const buttonVariants = ['default', 'destructive', 'outline', 'secondary', 'ghost', 'link'] return (
{/* Header */}

UI Component Library

Interactive showcase of all available UI components

{/* Category Filter */}
{categories.map((cat) => ( ))}
{/* Buttons Section */} {(selectedCategory === 'all' || selectedCategory === 'buttons') && (

Buttons

{/* Variant Selector */}
{buttonVariants.map((variant) => ( ))}
{/* Button Sizes */}
{/* All Button Variants */}
)} {/* Forms Section */} {(selectedCategory === 'all' || selectedCategory === 'forms') && (

Form Components

{/* Input */}
{/* Textarea */}