Switch
Basic
The Switch component is used for toggling between two states (on/off). It supports various customization options.
The basic usage of the Switch component involves binding a data property using the v-model directive. This directive automatically syncs the switch value with the specified data property, allowing for two-way data binding.
Type
The switchingType prop allows you to specify the type of switching mechanism. The available types are "checkbox" and "switch".
Label
The label prop allows you to specify the label displayed next to the switch.
Disabled
The disabled prop disables the switch if set to true.
Help
The help prop allows you to specify help text displayed below the switch.
Required
The required prop indicates whether the switch is required.
Mode
The mode prop allows you to specify the styling mode of the switch. The available modes are "outlined", "underlined", "filled", and "none".
Rounding
The rounded prop allows you to specify the rounding of the switch corners. The available values are 1 to 10, number, and "full".
Icons
The iconActive and iconInactive props allow you to specify icons displayed when the switch is active and inactive respectively.
Custom CSS Class
The class prop allows you to apply custom CSS classes to the switch container, enabling you to style it according to your design requirements.