Toggle

A two-state button that can be either on or off.

Installation ​

pnpm dlx shadcn-vue@latest add toggle

Usage ​

vue
<script setup lang="ts">
import { Toggle } from '@/components/ui/toggle'
</script>

<template>
  <Toggle>Toggle</Toggle>
</template>

Examples ​

Default ​

Outline ​

With Text ​

Small ​

Large ​

Disabled ​

Edit this page on GitHub