Skip to content

clintongreen/vue-checkbox-switch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vue Checkbox Switch

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

Installation

You don't need any dependencies except Vuejs 2

Copy src/Switch.vue to your components folder

Exemple

Screenshot

<template>
    <app-switch classes="is-warning" v-model="value" checked>Test</app-switch>
</template>

<script>
    import Switch from './components/Switch'

    export default {
        components: {
            'app-switch': Switch
        },
        data() {
            return {
                value: false,
                text: ''
            }
        },
        watch: {
            value(val) {
                this.text = val ? 'Yes' : 'No'
            }
        }
    }
</script>

Twitter @rafaelpimpa

About

A Vue component for checkbox's switch style

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vue 100.0%