File tree Expand file tree Collapse file tree 5 files changed +46
-13
lines changed Expand file tree Collapse file tree 5 files changed +46
-13
lines changed Original file line number Diff line number Diff line change @@ -22,19 +22,36 @@ yarn add vue-toggle-component
2222npm install vue-toggle-component --save
2323```
2424
25- #### Importing the package in your Vue application
26- ``` javascript
27- import VueToggle from ' vue-toggle-component' ;
28- ```
29-
3025
3126### Usage
3227#### Example
3328``` html
3429<template >
3530 <VueToggle title =" Toggle me" id =" 1" />
3631</template >
32+
33+ <script >
34+ import VueToggle from " ./components/VueToggle" ;
35+
36+ export default {
37+ name: ' App' ,
38+ components: {
39+ VueToggle
40+ }
41+ }
42+ </script >
3743```
44+
45+ #### 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 ` |
54+
3855### Vue version support
3956
4057The main v1 version supports Vue 3.x only, for previous versions of Vue, check the following the table.
Original file line number Diff line number Diff line change 11{
22 "name" : " vue-toggle-component" ,
3- "version" : " 1.0.6 " ,
3+ "version" : " 1.0.10 " ,
44 "main" : " dist/vue-toggle-component.common.js" ,
55 "files" : [
66 " dist/*"
Original file line number Diff line number Diff line change @@ -11,5 +11,4 @@ export default {
1111 VueToggle
1212 }
1313}
14-
1514 </script >
Original file line number Diff line number Diff line change @@ -22,19 +22,36 @@ yarn add vue-toggle-component
2222npm install vue-toggle-component --save
2323```
2424
25- #### Importing the package in your Vue application
26- ``` javascript
27- import VueToggle from ' vue-toggle-component' ;
28- ```
29-
3025
3126### Usage
3227#### Example
3328``` html
3429<template >
3530 <VueToggle title =" Toggle me" id =" 1" />
3631</template >
32+
33+ <script >
34+ import VueToggle from " ./components/VueToggle" ;
35+
36+ export default {
37+ name: ' App' ,
38+ components: {
39+ VueToggle
40+ }
41+ }
42+ </script >
3743```
44+
45+ #### 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 ` |
54+
3855### Vue version support
3956
4057The main v1 version supports Vue 3.x only, for previous versions of Vue, check the following the table.
Original file line number Diff line number Diff line change 11{
22 "name" : " vue-toggle-component" ,
3- "version" : " 1.0.9 " ,
3+ "version" : " 1.0.10 " ,
44
55 "main" : " dist/vue-toggle-component.ssr.js" ,
66 "browser" : " dist/vue-toggle-component.esm.js" ,
You can’t perform that action at this time.
0 commit comments