Vue Checkbox Switch

Vue Checkbox Switch

A simple Vue component for checkbox's switch style based on vue-bulma/switch and this PR on Bulma.

Example

Installation

You don't need any dependencies except Vuejs 2

Copy src/Switch.vue to your components folder

<template> <div id="app"> <div> <app-switch classes="is-warning" v-model="value" checked>Switch</app-switch> <app-switch v-model="value" disabled>Another one</app-switch> </div> </div> </template> <script type="text/babel"> import Switch from './components/Switch' export default { name: 'view', components: { 'app-switch': Switch }, data () { return { value: false, text: 'Enabled!' } }, watch: { value (val) { this.text = val ? 'Yes' : 'No' } } } </script>

Find on Vue Checkbox Switch GitHub.