Toggle Switch
Vue Bootstrap 5 Toggle Switch
Vue switch is a simple component used for activating one of two predefined options. Commonly used as an on/off button.
Basic example
A switch has the markup of a custom checkbox but uses the
.form-switch
class to render a toggle switch. Switches also support the
disabled
attribute.
Toggle Switch - API
Import
Properties
Property | Type | Default | Description |
---|---|---|---|
id
|
String | unique random id |
Changes input id |
inputClass
|
String | "" |
Adds input classes |
label
|
String | "" |
Changes input label |
labelClass
|
String | "" |
Adds input label classes |
tag
|
String | "div" |
Changes input wrapper tag |
v-model
|
Boolean | "" |
Changes input value with two-way data binding |
wrapperClass
|
String | "" |
Adds input wrapper classes |