1.0.0 • Published 3 years ago

@shapla/vue-radio v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Shapla Radio

A custom radio component that works like native radio component for Vue 3.

Table of contents

Installation

npm install --save @shapla/vue-radio

Usage

Styles

with Sass:

import '@shapla/vue-radio/src/index.scss';

with CSS:

import '@shapla/vue-radio/dist/style.css';

Javascript Instantiation

import ShaplaRadio from '@shapla/vue-radio';

export default {
  name: 'Hello',

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

Props

PropertyTypeRequiredDefaultDescription
labelStringno | Radio label
valueStringno | Radio value