shadcn-vue/apps/www/src/content/docs/components/switch.md
Sadegh Barati d34c620055
chore: lint and enable Volar hybrid mode (#419)
* chore: update deps

* feat: enable Volar hybrid mode

* chore: lint

* chore: build registry
2024-03-20 22:29:42 +03:30

829 B

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

Installation

npx shadcn-vue@latest add switch

<template #Manual>

Install the following dependency:

npm install radix-vue

Copy and paste the following code into your project

<<< @/lib/registry/default/ui/switch/Switch.vue

Usage

<script setup lang="ts">
import { Switch } from '@/components/ui/switch'
</script>

<template>
  <Switch />
</template>

Examples

Form