shadcn-vue/apps/www/src/content/docs/components/switch.md
2023-09-04 22:36:40 +08:00

718 B

title description source primitive
Switch 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/switch https://www.radix-vue.com/components/switch.html

Installation

npx shadcn-vue@latest add switch
  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 { Switch } from '@/lib/registry/default/ui/switch'
</script>

<template>
  <Switch />
</template>