lion/packages/select
CircleCI 6497db62d3 chore: release new versions
- @lion/ajax@0.1.3
 - @lion/button@0.1.2
 - @lion/checkbox-group@0.1.2
 - @lion/checkbox@0.1.2
 - @lion/choice-input@0.1.2
 - @lion/core@0.1.2
 - @lion/field@0.1.2
 - @lion/fieldset@0.1.2
 - @lion/form-system@0.0.3
 - @lion/form@0.1.2
 - @lion/icon@0.1.2
 - @lion/input-amount@0.1.2
 - @lion/input-date@0.1.2
 - @lion/input-email@0.1.2
 - @lion/input-iban@0.1.2
 - @lion/input@0.1.2
 - @lion/localize@0.1.2
 - @lion/overlays@0.1.2
 - @lion/popup@0.1.2
 - @lion/radio-group@0.1.2
 - @lion/radio@0.1.2
 - @lion/select@0.1.2
 - @lion/steps@0.1.2
 - @lion/textarea@0.1.2
 - @lion/tooltip@0.1.2
 - @lion/validate@0.1.2
2019-04-27 13:31:11 +00:00
..
src feat: release inital public lion version 2019-04-26 10:37:57 +02:00
stories feat: release inital public lion version 2019-04-26 10:37:57 +02:00
test feat: release inital public lion version 2019-04-26 10:37:57 +02:00
CHANGELOG.md chore: release new versions 2019-04-27 13:31:11 +00:00
index.js feat: release inital public lion version 2019-04-26 10:37:57 +02:00
lion-select.js feat: release inital public lion version 2019-04-26 10:37:57 +02:00
package.json chore: release new versions 2019-04-27 13:31:11 +00:00
README.md feat: release inital public lion version 2019-04-26 10:37:57 +02:00

Select

lion-select component is a wrapper around the native select.

You cannot use interactive elements inside the options. Avoid very long names to facilitate the understandability and perceivability for screen reader users. Sets of options where each option name starts with the same word or phrase can also significantly degrade usability for keyboard and screen reader users.

Features

  • catches and forwards the select events
  • can be set to required or disabled

How to use

Installation

npm i --save @lion/select
import '@lion/select/lion-select.js';

Example

<lion-select
  name="favoriteColor"
  .errorValidators=${[['required']]}
>
  <div slot="label">Favorite color</div>
  <select slot="input">
    <option selected hidden value>Please select</option>
    <option value="red">Red</option>
    <option value="hotpink">Hotpink</option>
    <option value="teal">Teal</option>
  </select>
</lion-select>

You can preselect an option by setting the property modelValue.

<lion-select
 name="favoriteColor"
 .modelValue="${'<value of option 2>'}"
>
 ...
</lion-select>