1.0.5 • Published 4 years ago

shapla-checkbox v1.0.5

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

Shapla Checkbox

A custom checkbox for VueJS that exactly work same way as native checkbox

Table of contents

Installation

npm i shapla-checkbox

Usage

Add the component:

import shaplaCheckbox from 'shapla-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.

Listeners

The button component fires the following events:

change: When checkbox is clicked, it fires the event.

<!-- template -->
<shapla-button @change="handleChange"></shapla-button>


<!-- method -->
methods: {
  handleChange(newValue){
    // Handle change event
  }
}
1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago