lion/packages/radio
CircleCI e15c943c1f chore: release new versions
- @lion/button@0.3.4
 - @lion/calendar@0.1.51
 - @lion/checkbox-group@0.1.49
 - @lion/checkbox@0.1.44
 - @lion/choice-input@0.2.21
 - @lion/field@0.1.41
 - @lion/fieldset@0.1.43
 - @lion/form-system@0.0.51
 - @lion/form@0.1.48
 - @lion/input-amount@0.1.44
 - @lion/input-date@0.1.43
 - @lion/input-datepicker@0.1.55
 - @lion/input-email@0.1.43
 - @lion/input-iban@0.1.44
 - @lion/input@0.1.43
 - @lion/localize@0.4.12
 - @lion/option@0.1.3
 - @lion/popup@0.2.31
 - @lion/radio-group@0.1.49
 - @lion/radio@0.1.44
 - @lion/select-rich@0.1.7
 - @lion/select@0.1.41
 - @lion/textarea@0.1.46
 - @lion/tooltip@0.2.31
 - @lion/validate@0.2.25
2019-08-07 11:25:08 +00:00
..
src fix: update storybook/linting; adjust story labels, eslint ignores 2019-04-28 15:02:31 +02:00
test feat: release inital public lion version 2019-04-26 10:37:57 +02:00
CHANGELOG.md chore: release new versions 2019-08-07 11:25:08 +00:00
index.js feat: release inital public lion version 2019-04-26 10:37:57 +02:00
lion-radio.js feat: release inital public lion version 2019-04-26 10:37:57 +02:00
package.json chore: release new versions 2019-08-07 11:25:08 +00:00
README.md chore: fix style of markdown files 2019-07-24 15:20:19 +02:00

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 checked boolean 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.