Skip to content

y14e/parent-checkbox

Repository files navigation

Parent Checkbox

WAI-ARIA compliant checkbox (mixed) pattern implementation in TypeScript.

Install

npm i @y14e/parent-checkbox
// npm
import ParentCheckbox from '@y14e/parent-checkbox';

// CDNs
import ParentCheckbox from 'https://esm.sh/@y14e/parent-checkbox'
// or
import ParentCheckbox from 'https://cdn.jsdelivr.net/npm/@y14e/parent-checkbox/+esm';
// or
import ParentCheckbox from 'https://unpkg.com/@y14e/parent-checkbox/dist/index.js';

Usage

new ParentCheckbox(root);
// => ParentCheckbox
//
// root: HTMLInputElement

📦 APIs

destroy

Destroys the instance and cleans up all event listeners.

checkbox.destroy();
// => void

Demo

https://y14e.github.io/parent-checkbox/

About

WAI-ARIA compliant checkbox (mixed) pattern implementation in TypeScript.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors