# 组件文档 ## 组件概述 项目组件采用分层架构设计,分为基础 UI 组件、布局组件、业务区块组件和视觉效果组件。 ## 组件分类 ### 1. UI 基础组件 (`src/components/ui/`) 基于 shadcn/ui 的可复用基础组件,遵循 Radix UI 的无状态设计原则。 #### Button 按钮 ```tsx import { Button } from '@/components/ui/button'; // 基础用法 // 变体 // 尺寸 ``` #### Card 卡片 ```tsx import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '@/components/ui/card'; 标题 描述文字 内容区域 底部操作 ``` #### Input 输入框 ```tsx import { Input } from '@/components/ui/input'; ``` #### Textarea 文本域 ```tsx import { Textarea } from '@/components/ui/textarea';