- @lion/button@0.3.28 - @lion/calendar@0.2.6 - @lion/checkbox-group@0.1.68 - @lion/checkbox@0.1.61 - @lion/choice-input@0.2.38 - @lion/field@0.3.2 - @lion/fieldset@0.1.60 - @lion/form-system@0.0.74 - @lion/form@0.1.67 - @lion/input-amount@0.1.63 - @lion/input-date@0.1.61 - @lion/input-datepicker@0.2.6 - @lion/input-email@0.1.61 - @lion/input-iban@0.1.63 - @lion/input@0.1.60 - @lion/option@0.2.3 - @lion/popup@0.3.5 - @lion/radio-group@0.1.69 - @lion/radio@0.1.61 - @lion/select-rich@0.3.8 - @lion/select@0.1.58 - @lion/textarea@0.1.63 - @lion/tooltip@0.3.5 - @lion/validate@0.2.36 |
||
|---|---|---|
| .. | ||
| src | ||
| test | ||
| CHANGELOG.md | ||
| index.js | ||
| lion-radio.js | ||
| package.json | ||
| README.md | ||
Radio
lion-radio component is a sub-element to be used in lion-radio-group elements. Its purpose is to provide a way for users to check a single option amongst a set of choices.
Features
- Get or set the checked state (boolean) -
choiceChecked() - Get or set the value of the choice -
choiceValue() - Pre-select an option by setting the
checkedboolean attribute
How to use
Installation
npm i --save @lion/radio
import '@lion/radio/lion-radio.js';
Example
<lion-radio name="dinos[]" label="allosaurus" .choiceValue=${'allosaurus'}></lion-radio>
<lion-radio name="dinos[]" label="brontosaurus" .choiceValue=${'brontosaurus'}></lion-radio>
<lion-radio name="dinos[]" label="diplodocus" .choiceValue=${'diplodocus'} checked></lion-radio>
- Use this component inside a lion-radio-group
- Make sure that it has a name attribute with appended
[]for multiple choices.