tickbox

1.1.0 • Public • Published

tickbox

checkbox, radio, switch

npm GitHub package version NPM Downloads

600B gzipped

Demo


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

/tickbox/

    Package Sidebar

    Install

    npm i tickbox

    Weekly Downloads

    1

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    46.5 kB

    Total Files

    17

    Last publish

    Collaborators

    • ux-ui