npm.io
1.0.11 • Published 19h ago

@y14e/parent-checkbox

Licence
MIT
Version
1.0.11
Deps
0
Size
8 kB
Vulns
0
Weekly
0

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@1.0.11';
// or
import ParentCheckbox from 'https://cdn.jsdelivr.net/npm/@y14e/parent-checkbox@1.0.11/+esm';
// or
import ParentCheckbox from 'https://esm.unpkg.com/@y14e/parent-checkbox@1.0.11';

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/

Keywords