Docs
复选框(Checkbox)

复选框(Checkbox)

允许用户在 “选中(checked)”和 “不选中(not checked)”之间切换的控件。

安装

npx shadcn@latest add checkbox

用法

import { Checkbox } from "@/components/ui/checkbox"
<Checkbox />

示例

带有说明信息的复选框

You agree to our Terms of Service and Privacy Policy.

禁用

表单

You can manage your mobile notifications in the mobile settings page.

Select the items you want to display in the sidebar.