Skip to content

An easy to use Checkbox and Radio components for Vue 2

Notifications You must be signed in to change notification settings

umutbozdag/vue2-easy-controls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vue Easy Controls

An easy to use Checkbox and Radio components for Vue 2

Installing

npm i vue2-easy-controls

OR

yarn add vue2-easy-controls

OR get the library via UNPKG

Usage

Registering components globally

import { EasyCheckbox, EasyRadio } from 'vue2-easy-controls'

Vue.use(EasyCheckbox)
Vue.use(EasyRadio)

Registering components locally

import { EasyCheckbox, EasyRadio } from 'vue2-easy-controls'

export default {
  name: 'MyLocalComponent'
  components: {
    EasyCheckbox,
    EasyRadio
  }
}

Usage

data () {
  return {
    isChecked: false
  }
}
  <easy-checkbox text="Checkbox component" v-model="isChecked" />

OR

  <easy-radio text="Radio component" v-model="isChecked" />

For more examples check here

NOTE: Props for both of the components are the same

Props

Prop Type Default
value Any
checked Boolean false
disabled Boolean false
required Boolean false
text String
labelStyle Object { color (default: #3D4066), fontSize (default: '16px'), marginLeft (default: '8px'), marginRight: (default: '8px') }
labelOnLeft Boolean false
show Boolean true

TODO:

  • Make components more customizable (custom style, custom icons etc.)
  • Make components more accessible
  • Improve documentation by adding live examples
  • Add switch component

About

An easy to use Checkbox and Radio components for Vue 2

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published