@lion/checkbox-group
TypeScript icon, indicating that this package has built-in type declarations

0.21.1 • Public • Published

Checkbox Group >> Overview ||10

A checkbox group 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 our checkbox elements as children in checkbox group.

import { html } from '@mdjs/mdjs-preview';
import '@lion/checkbox-group/define';
export const main = () => html`
  <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>
`;

Make sure that the checkbox-group also has a name attribute, this is necessary for our form's serialization result.

Features

Since it extends from our fieldset, it has all the features a fieldset has.

Installation

npm i --save @lion/checkbox-group
import '@lion/checkbox-group/define';

Dependencies (3)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @lion/checkbox-group

    Weekly Downloads

    1,832

    Version

    0.21.1

    License

    MIT

    Unpacked Size

    77.3 kB

    Total Files

    33

    Last publish

    Collaborators

    • tlouisse
    • narzac
    • d4kmor