BaseToggle
Toggle Component
Props
| Prop name | Description | Type | Values | Default |
|---|---|---|---|---|
| name | specify a descriptive name this will not be displayed but is only there for usability purposes | string | - | 'baseToggle' |
| label | specify label | string | - | 'baseToggle' |
| disabled | disable the toggle button | boolean | - | false |
| modelValue | is toggle checked | boolean | - | false |
| hideLabel | specify visibility of the label | boolean | - | false |
| bindSlotToState | bind visibility of slot content to components checked state | boolean | - | false |
| inputId | if field is occurring more than once - set an id | string | - | '' |
| required | mark as required field | boolean | - | false |
| invalid | mark 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 |
| errorMessage | add an error message to be displayed below form field if field is invalid | string | - | '' |
| showErrorIcon | define if error icon should be shown | boolean | - | true |
Events
| Event name | Properties | Description |
|---|---|---|
| update:model-value | undefined string, boolean - emitted input value (string for Radio Button, boolean value for Checkmark) | event emitted on radio button / checkmark click |
Slots
| Name | Description | Bindings |
|---|---|---|
| error-icon | use a custom icon instead of standard error/warning icon | |
| default | slot after the label |
Demo
Toggle Button Example