shadcn-vue/apps/www/src/content/docs/components/checkbox.md
2023-08-30 22:47:55 +08:00

828 B

title description source primitive
Checkbox A control that allows the user to toggle between checked and not checked. https://github.com/radix-vue/shadcn-vue/tree/main/apps/www/src/lib/registry/default/ui/checkbox https://www.radix-vue.com/components/checkbox.html

<<< ../../../lib/registry/default/examples/CheckboxDemo.vue

Installation

npx shadcn-vue@latest add checkbox
  1. Install radix-vue:
npm install radix-vue
  1. Copy and paste the component source files linked at the top of this page into your project.

Usage

<script setup lang="ts">
import { Checkbox } from '@/lib/registry/default/ui/checkbox'
</script>

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