@@ -31,7 +31,7 @@ npm install vue-toggle-component --save
3131</template >
3232
3333<script >
34- import VueToggle from " ./components/VueToggle " ;
34+ import VueToggle from " vue-toggle-component " ;
3535
3636export default {
3737 name: ' App' ,
@@ -43,20 +43,20 @@ export default {
4343```
4444
4545#### Properties that vue-toggle-component uses
46- | Property name | Description |
47- | ------------- | ---------------------------- |
48- | ` activeColor ` | The active color the checked toggler uses. This is a hex code. Default: ` #9FD6AE ` |
49- | ` darkTheme ` | Give this prop to the component to use the dark mode feature as shown in the GIF above. |
50- | ` id ` | The ID the input and the label use in the component. |
51- | ` name ` | The name attributes that will be set in the input . |
52- | ` title ` | The title that is shown after the toggler itself. |
53- | ` toggled ` | The value the toggler has by default, by default this is ` false ` |
46+ | Property name | Type | Default | Required | Description |
47+ | ------------- | --------- | --------- | -------- | ------------------------------------------------------------------------------- ------------------- |
48+ | name | ` String ` | - | X | Set's the name value of the input (checkbox). Useful for persisting data. |
49+ | title | ` String ` | - | X | The title that is displayed next to the toggle. |
50+ | activeColor | ` String ` | ` #9FD6AE ` | - | The color that is displayed when the toggler is active. |
51+ | darkTheme | ` Boolean ` | ` false ` | - | Set's dark mode to active. (note that this will not change the background like in the preview GIF . |
52+ | disabled | ` Boolean ` | ` false ` | - | Disables the toggler. |
53+ | toggled | ` Boolean ` | ` true ` | - | Sets the default value for the toggler. |
5454
5555### Vue version support
5656
5757The main v1 version supports Vue 3.x only, for previous versions of Vue, check the following the table.
5858
59- | vue Version | vue-toggle-component version |
59+ | Vue version | vue-toggle-component version |
6060| ----------- | ---------------------------- |
6161| ` 2.x ` | ` 0.1.x ` |
6262| ` 3.x ` | ` 1.x ` |
0 commit comments