Switch
Simple and functional.
State
To implement a switch element in the application, we add the component vs-switch
.
Color
You can choose the default Switch. You are able to use the Main Colors or RGB and HEX colors.
WARNING
Supported colors are RGB and HEX
Text
You can add a descriptive text with the slot on
or off
. You can also join the text with the icons.
Icons
We can add a representative icon inside our switch with the property vs-icon
.
If you only need to add the icon in one of the states you can do it with the property vs-icon-on
or vs-icon-off
TIP
Vuesax uses the Google Material Icons font library by default. For a list of all available icons, visit the official Material Icons page. Other icon libraries can be used by providing the class for the respective pack in the icon-pack property. ex. FA4 uses fa or fas, FA5 uses fas, far, or fal.
Array Value
For saving the values in an array, you could simply pass it as a value.
WARNING
For using an array as a value, we need to use the vs-value
property inside the switch component. That is the value that will be added to the array.
- [ "luis" ]