- @lion/checkbox-group@0.9.1 - @lion/dialog@0.6.3 - @lion/fieldset@0.11.1 - @lion/form-system@0.8.3 - @lion/form@0.5.1 - @lion/icon@0.5.2 - @lion/input-datepicker@0.13.3 - @lion/overlays@0.15.3 - @lion/radio-group@0.9.1 - @lion/select-rich@0.17.3 - @lion/tooltip@0.10.4 |
||
|---|---|---|
| .. | ||
| src | ||
| stories | ||
| test | ||
| CHANGELOG.md | ||
| index.js | ||
| lion-checkbox-group.js | ||
| lion-checkbox.js | ||
| package.json | ||
| README.md | ||
Checkbox Group
lion-checkbox-group component enhances the functionality of the native <input type="checkbox"> element. Its purpose is to provide a way for users to check multiple options amongst a set of choices, or to function as a single toggle.
You should use lion-checkbox inside this element.
Live Demo/Documentation
See our storybook for a live demo and API documentation
How to use
Installation
npm i --save @lion/checkbox-group
import '@lion/checkbox-group/lion-checkbox-group.js';
import '@lion/checkbox-group/lion-checkbox.js';
Example
<lion-checkbox-group
name="scientists[]"
label="Favorite scientists"
>
<lion-checkbox label="Archimedes" .choiceValue=${'Archimedes'}></lion-checkbox>
<lion-checkbox label="Francis Bacon" .choiceValue=${'Francis Bacon'}></lion-checkbox>
<lion-checkbox label="Marie Curie" .choiceValue=${'Marie Curie'}></lion-checkbox>
</lion-checkbox-group>