An open API service indexing awesome lists of open source software.

https://github.com/rfberaldo/vue-checkbox-switch

A Vue component for checkbox's switch style
https://github.com/rfberaldo/vue-checkbox-switch

bulma checkbox-switch-style switch vue-checkbox-switch vue-components vuejs vuejs2

Last synced: 24 days ago
JSON representation

A Vue component for checkbox's switch style

Awesome Lists containing this project

README

          

# Vue Checkbox Switch

A simple Vue component for checkbox's switch style based on [vue-bulma/switch](https://github.com/vue-bulma/switch) and [this PR](https://github.com/jgthms/bulma/pull/544) on [Bulma](https://github.com/jgthms/bulma)

## Installation

**You don't need any dependencies** except Vuejs 2

Copy ``src/Switch.vue`` to your components folder

## Example

![Screenshot](https://github.com/rafaelpimpa/vue-checkbox-switch/blob/master/screenshot.png)

```vue

Test

import Switch from './components/Switch'

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

```

---

> Twitter [@rafaelpimpa](https://twitter.com/rafaelpimpa)