1.1.0 • Published 8 months ago

tickbox v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

npm GitHub package version NPM Downloads

Install

$ yarn add tickbox

Import

JS (optional) adds aria-checked attribute indicates the current "checked" state of checkboxes, radio buttons and switches

import Tickbox from 'tickbox'

CSS

@import "tickbox/dist";

or source if your bundler supports SCSS

@import "tickbox/src";

Use

JS (optional)

Tickbox.init()

HTML more examples

// Checkbox
<div class="tickbox">
	<input id="one" type="checkbox">
	<label for="one">
		<span>Checkbox</span>
	</label>
</div>

// Radio
<div class="tickbox">
	<input id="two" type="radio">
	<label for="two">
		<span>Radio</span>
	</label>
</div>

// Switch checkbox
<div class="tickbox">
	<input id="three" type="checkbox" role="switch">
	<label for="three">
		<span>Switch checkbox</span>
	</label>
</div>

// Switch radio
<div class="tickbox">
	<input id="four" type="radio" role="switch">
	<label for="four">
		<span>Switch radio</span>
	</label>
</div>

License

tickbox is released under MIT license