@@ -24,30 +24,30 @@ npm install vue-toggle-component --save
2424#### Example
2525``` html
2626<template >
27- <VueToggle title =" Toggle me" name =" VueToggle" />
27+ <VueToggle title =" Toggle me" name =" VueToggle" />
2828</template >
2929
3030<script >
31- import VueToggle from " vue-toggle-component" ;
31+ import VueToggle from " vue-toggle-component" ;
3232
33- export default {
34- name: ' App' ,
35- components: {
36- VueToggle
37- }
38- }
33+ export default {
34+ name: ' App' ,
35+ components: {
36+ VueToggle
37+ }
38+ }
3939 </script >
4040```
4141
4242#### Properties that vue-toggle-component uses
4343| Property name | Type | Default | Required | Description |
4444| ------------- | --------- | --------- | -------- | -------------------------------------------------------------------------------------------------- |
45- | name | ` String ` | - | X | Set's the name value of the input (checkbox). Useful for persisting data. |
46- | title | ` String ` | - | X | The title that is displayed next to the toggle. |
47- | activeColor | ` String ` | ` #9FD6AE ` | - | The color that is displayed when the toggler is active. |
48- | darkTheme | ` Boolean ` | ` false ` | - | Set's dark mode to active. (note that this will not change the background like in the preview GIF) |
49- | disabled | ` Boolean ` | ` false ` | - | Disables the toggler. |
50- | toggled | ` Boolean ` | ` true ` | - | Sets the default value for the toggler. |
45+ | name | ` String ` | ❌ | ✅️ | Set's the name value of the input (checkbox). Useful for persisting data. |
46+ | title | ` String ` | ❌ | ✅ | The title that is displayed next to the toggle. |
47+ | activeColor | ` String ` | ` #9FD6AE ` | ❌ | The color that is displayed when the toggler is active. |
48+ | darkTheme | ` Boolean ` | ` false ` | ❌ | Set's dark mode to active. (note that this will not change the background like in the preview GIF) |
49+ | disabled | ` Boolean ` | ` false ` | ❌ | Disables the toggler. |
50+ | toggled | ` Boolean ` | ` true ` | ❌ | Sets the default value for the toggler. |
5151
5252### Vue version support
5353The main v1 version supports Vue 3.x only, for previous versions of Vue, check the following the table.
0 commit comments