lion/packages/radio
CircleCI 417b37a616 chore: release new versions
- @lion/ajax@0.2.5
 - @lion/button@0.5.6
 - @lion/calendar@0.6.10
 - @lion/checkbox-group@0.6.4
 - @lion/checkbox@0.3.12
 - @lion/choice-input@0.6.2
 - @lion/core@0.4.4
 - @lion/dialog@0.4.6
 - @lion/field@0.9.2
 - @lion/fieldset@0.7.2
 - @lion/form-system@0.4.6
 - @lion/form@0.4.12
 - @lion/helpers@0.3.2
 - @lion/icon@0.3.4
 - @lion/input-amount@0.5.12
 - @lion/input-date@0.5.12
 - @lion/input-datepicker@0.8.16
 - @lion/input-email@0.5.12
 - @lion/input-iban@0.5.13
 - @lion/input-range@0.2.12
 - @lion/input@0.5.12
 - @lion/localize@0.8.7
 - @lion/option@0.5.2
 - @lion/overlays@0.12.2
 - @lion/radio-group@0.6.3
 - @lion/radio@0.4.2
 - @lion/select-rich@0.10.4
 - @lion/select@0.5.12
 - @lion/steps@0.3.4
 - @lion/switch@0.5.14
 - @lion/tabs@0.2.4
 - @lion/textarea@0.5.13
 - @lion/tooltip@0.8.2
 - @lion/validate@0.6.7
2020-02-19 20:54:44 +00:00
..
src feat: flatten modelValue and remove checkedValue 2020-02-06 16:06:52 +01:00
stories feat: flatten modelValue and remove checkedValue 2020-02-06 16:06:52 +01:00
test feat: flatten modelValue and remove checkedValue 2020-02-06 16:06:52 +01:00
CHANGELOG.md chore: release new versions 2020-02-19 20:54:44 +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 2020-02-19 20:54:44 +00:00
README.md feat: remove all deprecations from lion 2019-11-13 11:00:48 +01: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 the checked state (boolean) - checked boolean attribute
  • Pre-select an option by setting the checked boolean attribute
  • Get or set the value of the choice - choiceValue()

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.