Skip to content

BaseToggle

Toggle Component

Props

Prop nameDescriptionTypeValuesDefault
namespecify a descriptive name
this will not be displayed but is only there for usability purposes
string-'baseToggle'
labelspecify labelstring-'baseToggle'
disableddisable the toggle buttonboolean-false
modelValueis toggle checkedboolean-false
hideLabelspecify visibility of the labelboolean-false
bindSlotToStatebind visibility of slot content to components checked stateboolean-false
inputIdif field is occurring more than once - set an idstring-''
requiredmark as required fieldboolean-false
invalidmark the form field as invalid and ideally also provide an error message
to display below the form field
the v-model directive might be used on this prop
boolean-false
errorMessageadd an error message to be displayed below form field if field is invalidstring-''
showErrorIcondefine if error icon should be shownboolean-true

Events

Event namePropertiesDescription
update:model-valueundefined string, boolean - emitted input value (string for Radio Button, boolean value for Checkmark)event emitted on radio button / checkmark click

Slots

NameDescriptionBindings
error-iconuse a custom icon instead of standard error/warning icon
defaultslot after the label

Demo

Toggle Button Example