Skip to content
↑↓ to navigate↵ to openesc to close

Menu

Switch

Preview

Install

Add it with your package manager, or copy the source manually.

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/switch

Import the shared styles once in your application.

TSUsage
import Switch from '@/components/beui/primitives/Switch.vue'
import '@/components/beui/styles.css'

API Reference

v-model:checked?
boolean
Defaultfalse
disabled?
boolean
Default—
label?
string
Default—
ariaLabel?
string
Default—
class?
string
Default—
id?
string
Default—
@checked-change?
(checked: boolean) => void
Default—
Also on React Native. A weighty thumb that squishes and stretches.(opens in a new tab)

Updated