1.0.1 • Published 4 years ago

shapla-radio-button v1.0.1

Weekly downloads
6
License
MIT
Repository
github
Last release
4 years ago

shapla-radio-button

A custom buttons group component that works like native radio.

Table of contents

Installation

npm i shapla-radio-button

Usage

Add the component:

import radioButton from 'shapla-radio-button';

export default {
    name: 'Hello',

    components: {
        radioButton
    },
    data() {
        return {
            option: 'one',
            options: [
                {label: 'One', value: 'one'},
                {label: 'Two', value: 'two'},
                {label: 'Three', value: 'three'},
            ],
        }
    }
}
<radio-button v-for="_option in options" :key="_option.value" :value="_option.value" v-model="option">{{_option.label}}</radio-button>

Props

PropertyTypeRequiredDefaultDescription
labelStringno | Radio label
valueStringno | Radio value
1.0.1

4 years ago

1.0.0

4 years ago