An easy to use Checkbox and Radio components for Vue 2
npm i vue2-easy-controls
yarn add vue2-easy-controls
import { EasyCheckbox, EasyRadio } from 'vue2-easy-controls'
Vue.use(EasyCheckbox)
Vue.use(EasyRadio)
import { EasyCheckbox, EasyRadio } from 'vue2-easy-controls'
export default {
name: 'MyLocalComponent'
components: {
EasyCheckbox,
EasyRadio
}
}
data () {
return {
isChecked: false
}
}
<easy-checkbox text="Checkbox component" v-model="isChecked" />
<easy-radio text="Radio component" v-model="isChecked" />
For more examples check here
NOTE: Props for both of the components are the same
Prop | Type | Default |
---|---|---|
value | Any | |
checked | Boolean | false |
disabled | Boolean | false |
required | Boolean | false |
text | String | |
labelStyle | Object | { color (default: #3D4066), fontSize (default: '16px'), marginLeft (default: '8px'), marginRight : (default: '8px') } |
labelOnLeft | Boolean | false |
show | Boolean | true |
- [ ] Make components more customizable (custom style, custom icons etc.)
- [ ] Make components more accessible
- [ ] Improve documentation by adding live examples
- [ ] Add switch component