1.0.0 • Published 3 years ago

toggle-switch-button-vue v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

toggle-switch-button-vue

VUE-3

No Dependency only single vue component file

A vue component with two way binding via v-model a boolean value toggle true/false

also label property shows label on button with '|' separated. As "ON|OFF"

npm.io npm.io

Properties

propstypedefaultdescription
v-modelBooleanfalsetwo way binding that toggle value true/false
labelstringpipe separated value "ON|OFF"
classNamestring"toggle-switch-button"custom css class name to change the UI layout

How to Install

copy following code and run on CLI

npm install toggle-switch-button-vue

How to use

Example Code

download from gitHub

usase

template sectioln

<div>
    <ToggleSwitchButton v-model="this.isActive" label="ON|OFF" />
</div>
<h1>{{ isActive }}</h1>

script section

import ToggleSwitchButton from "toggle-switch-button-vue";

components section

components: {
    ToggleSwitchButton
},

data section

data() {
    return {
      isActive: true
    };
},

methods section

methods: {
    
  }
  
  

View Demo

View Demo

License Free

Author : Govind Prasad Gupta

developergovindgupta

email : govindprasadguptamca@gmail.com