/**
* Component Gallery Demo
* Interactive showcase of all UI components
*/
import React, { useState } from 'react'
export default function ComponentGallery() {
const [selectedCategory, setSelectedCategory] = useState('all')
const [buttonVariant, setButtonVariant] = useState('default')
const [switchState, setSwitchState] = useState(false)
const [checkboxState, setCheckboxState] = useState(false)
const [selectedTab, setSelectedTab] = 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 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 */}
{/* Checkbox */}
{/* Switch */}
{/* Select */}
{/* Form Actions */}
)}
{/* Feedback Section */}
{(selectedCategory === 'all' || selectedCategory === 'feedback') && (
Feedback Components
{/* Badges */}
Default
Secondary
Destructive
Success
Warning
Info
Outline
{/* Progress */}
{/* Alerts */}
⚠
Error occurred
Something went wrong. Please try again.
✓
Success!
Your changes have been saved.
)}
{/* Navigation Section */}
{(selectedCategory === 'all' || selectedCategory === 'navigation') && (
Navigation Components
{/* Tabs */}
{['Overview', 'Documentation', 'API Reference', 'Examples'].map((tab) => (
))}
{/* Breadcrumb */}
)}
{/* Overlays Section */}
{(selectedCategory === 'all' || selectedCategory === 'overlays') && (
Overlay Components
Dialog
Modal dialogs for focused user interactions.
Drawer
Side panels that slide in from screen edges.
Dropdown Menu
Context menus and action lists.
)}
)
}