开关

一个用于指示某项设置开启或关闭的控件。

安装

pnpm dlx shadcn@latest add @lumi-ui/switch

基本用法

import { Switch } from "@/components/ui/switch"
<Switch />

组件结构

 <Switch />

尺寸

禁用状态

错误状态

自定义样式

表单集成

Receive email notifications about new messages and updates

表单集成(包裹标签)

Receive email notifications about new messages and updates

更多信息请参阅 表单集成