1.0.6 • Published 8 years ago
vm-checkbox v1.0.6
vm-checkbox
Simple material checkbox for vue
Install
npm install vm-checkboxSetup
import { Checkbox } from 'vm-checkbox';
Vue.component('checkbox', Checkbox);Usage
<checkbox
v-model="checked"
:name="name"
:value="checked"
:checked="false"
:required="false"
:disabled="false"
:labelRight="'Hello world'"
:color="'indigo'"
:inputClass="['class', 'test2']"
:labelClass="{ 'test3' : true }">
</checkbox>Params
| Parameter | Type | Default |
|---|---|---|
| name | string | null |
| value | string or boolean | null |
| checked | boolean | false |
| required | boolean | false |
| disabled | boolean | false |
| color | string | black |
| labelRight | string | undefined |
| labelLeft | string | undefined |
| inputClass | string, array, object | undefined |
| labelClass | string, array, object | undefined |
Colors
| Color | Value |
|---|---|
| red | #F44336 |
| pink | #E91E63 |
| purple | #673AB7 |
| deep-purple | #673AB7 |
| indigo | #3F51B5 |
| blue | #2196F3 |
| light-blue | #03A9F4 |
| cyan | #00BCD4 |
| teal | #009688 |
| green | #4CAF50 |
| light-green | #8BC34A |
| lime | #CDDC39 |
| yellow | #FFEB3B |
| amber | #FFC107 |
| orange | #FF9800 |
| deep-orange | #FF5722 |
| brown | #795548 |
| grey | #9E9E9E |
| blue-grey | #607D8B |
| black | #000 |
Slots
<checkbox>
<div>content</div>
</checkbox>License
MIT © Jarosław Krupiński