1.0.0 • Published 4 years ago

@maqe-vue/maqe-vue-radio-input v1.0.0

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
4 years ago

@maqe-vue/radio-input

The Vue2 component for radio-input

label-insde

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

NameTypeDescriptiondefault
v-modelbind
listarrayRadio group including list[]
list > valueString | Integernull
list > titleStringLabel name""
list > disabledBooleanfalse
containerClassstring

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>