1.0.0 • Published 3 years ago

@shapla/vue-checkbox v1.0.0

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

Shapla Checkbox

A custom checkbox for Vue 3 that exactly work same way as native checkbox

Table of contents

Installation

npm install --save @shapla/vue-checkbox

Usage

Styles

with SCSS:

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

with CSS:

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

Javascript Instantiation

import ShaplaCheckbox from '@shapla/vue-checkbox';

export default {
  name: 'Hello',

  components: {
    ShaplaCheckbox
  },

  data(){
    return {
  	    singleCheckbox:false
  	}
  }
}
<shapla-checkbox v-model="singleCheckbox">Label goes here.</shapla-checkbox>

Props

PropertyTypeRequiredDefaultDescription
labelStringno | Checkbox label
valueStringnoonThe default value for the checkbox
trueValueStringnotrueThe value when user checked the checkbox
falseValueStringnofalseThe value when user unchecked the checkbox
disabledBooleannofalseIf set true, Checkbox will be disabled to check.
checkedBooleannoundefinedIf set true, Checkbox will be checked.