@maqe-vue/radio-input
The Vue2 component for radio-input
See demo on: Storybook
Installation
NPM
Install the npm package.
npm install @maqe-vue/radio-input --save
Register the component
import Input from '@maqe-vue/radio-input'
import '@maqe-vue/radio-input/dist/style.css'
Vue.component('vmq-radio', Input)
Usage
Basic
<vmq-radio
v-model="radio"
:list="[
{ value: 'yes', title: 'Yes' },
{ value: 'no', title: 'No' }
]"
/>
API
Props
Name | Type | Description | default |
---|---|---|---|
v-model |
bind |
||
list |
array |
Radio group including list | [] |
list > value |
`String | Integer` | |
list > title |
String |
Label name | "" |
list > disabled |
Boolean |
false |
|
containerClass |
string |
Style
Custom Style
Custom style with css variable
<vmq-radio
v-model="radio"
:list="[
{ value: 'yes', title: 'Yes' },
{ value: 'no', title: 'No' }
]"
/>
// for example to set as a global
<style>
:root {
--vmq-radio-color: tan;
}
</style>