707 B
707 B
| title | description | source | primitive |
|---|---|---|---|
| Toggle | A two-state button that can be either on or off. | https://github.com/radix-vue/shadcn-vue/tree/main/apps/www/src/lib/registry/default/ui/toggle | https://www.radix-vue.com/components/toggle.html |
Installation
npx shadcn-vue@latest add toggle
- Install
radix-vue:
npm install radix-vue
- Copy and paste the component source files linked at the top of this page into your project.
Usage
<script setup lang="ts">
import { Toggle } from '@/lib/registry/default/ui/toggle'
</script>
<template>
<Toggle>Toggle</Toggle>
</template>