1.1 KiB
1.1 KiB
| title | description | source | primitive |
|---|---|---|---|
| Toggle | A two-state button that can be either on or off. | apps/www/src/lib/registry/default/ui/toggle | https://www.radix-vue.com/components/toggle.html |
Installation
npx shadcn-vue@latest add toggle
<template #Manual>
Install the following dependencies:
npm install radix-vue
Copy and paste the following code into your project
<<< @/lib/registry/default/ui/toggle/Toggle.vue
Usage
<script setup lang="ts">
import { Toggle } from '@/components/ui/toggle'
</script>
<template>
<Toggle>Toggle</Toggle>
</template>