Appearance
ToggleButton
The ToggleButton
has the markup of a custom checkbox but renders as a toggle switch.
Examples
html
<ToggleButton
@toggle-button:click="handleToggleButton"
on-label="Feature On"
off-label="Feature Off"
:default-on="false"
class="text-primary-500"
/>
An example can be seen in /frontend/views/ComponentExamples.vue
Component Props
Prop | Description | Options |
---|---|---|
on-label | the label to displat when toggle is on | |
off-label | the label to displat when toggle is off | |
default-on | default the state of the toggle button to on | true or false |
Component Events
Event | Description | Args |
---|---|---|
@toggle-button:click | emits when the toggle button is clicked | toggle button checked value |
CSS Classes
Class | Description |
---|---|
-- |