复选框

一种允许用户在选中和未选中状态之间切换的控件。

安装方法

pnpm dlx shadcn-vue@latest add checkbox

使用方法

vue
<script setup lang="ts">
import { Checkbox } from '@/components/ui/checkbox'
</script>

<template>
  <Checkbox id="terms" />
</template>

示例

带文本

You agree to our Terms of Service and Privacy Policy.

禁用状态

表单应用

请先阅读 vee-validate 文档中的复选框与单选框输入控件章节

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

Select the items you want to display in the sidebar.


Edit this page on GitHub