lion/packages/radio
Thomas Allmer 4a93599228 chore: update storybook version
Co-authored-by: Joren Broekema <Joren.Broekema@ing.com>
2020-01-13 13:58:03 +01:00
..
src feat: remove all deprecations from lion 2019-11-13 11:00:48 +01:00
test feat: remove all deprecations from lion 2019-11-13 11:00:48 +01:00
CHANGELOG.md chore: release new versions 2020-01-08 15:32:29 +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: update storybook version 2020-01-13 13:58:03 +01: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.