Description:
A themeable, customizable on/off toggle switch component for Vue.js.
Available themes:
- Default
- iOS
How to use it:
1. Import the register the component.
import OnoffToggle from 'vue-onoff-toggle'
new Vue({ components: { OnoffToggle }, data() { return { checked: false // true } } })
2. Add the toggle switch component to the app.
<onoff-toggle v-model="checked" />
3. Available props to config the toggle switch.
value: { type: Boolean, default: false }, theme: { type: String, default: 'default' }, name: { type: String }, disabled: { type: Boolean, default: false }, onColor: { type: String }, offColor: { type: String }, thumbColor: { type: String }, borderColor: { type: String }, width: { type: [Number, String] }, height: { type: [Number, String] }, margin: { type: [Number, String] }
Preview:
Download Details:
Author: devwiz1028
Live Demo: https://github.com/devwiz1028/vue-toggle-switch
Download Link: https://github.com/devwiz1028/vue-toggle-switch/archive/master.zip
Official Website: https://github.com/devwiz1028/vue-toggle-switch
Install & Download:
# Yarn
$ yarn add vue-onoff-toggle
# NPM
$ npm i vue-onoff-toggle