Sheet 抽屉
从右侧滑出的面板,查看详情或编辑。
安装
pnpm dlx shadcn@latest add https://docs.linasan.cn/r/sheet.json第一次装本站的组件前先在项目里执行一次 shadcn init,详见 安装。
用法
import { Sheet, SheetBody, SheetContent, SheetFooter } from '@/components/ui/sheet';
<Sheet open={open} onOpenChange={setOpen}>
<SheetContent title="详情" width={560}>
<SheetBody>…</SheetBody>
<SheetFooter>…</SheetFooter>
</SheetContent>
</Sheet>属性
属性
类型