import { Story, Meta, html } from '@open-wc/demoing-storybook'; import '../lion-option.js'; # Option `lion-option` is a selectable within a [lion-select-rich](?path=/docs/forms-select-rich--default-story) {html` Hotpink `} ```html Hotpink ``` ## Features - has checked state - has a modelValue - can be disabled ## How to use ### Installation ```sh npm i --save @lion/option ``` ```js import '@lion/option/lion-option.js'; ``` ## States {html` Default Disabled

With html

and multi Line

`}
```html Default Disabled

With html

and multi Line

``` ## Values The `modelValue` of a `` are Objects containing a `value` property and a `checked` boolean property. The value can be any complex or simple JavaScript value. {html` setting modelValue setting modelValue active setting modelValue checked setting modelValue disabled `} ```html setting modelValue setting modelValue active setting modelValue checked setting modelValue disabled ``` If you want only the value without the `checked` state, use `choiceValue`. {html` setting choiceValue setting choiceValue active setting choiceValue checked setting choiceValue disabled `} ```html setting choiceValue setting choiceValue active setting choiceValue checked setting choiceValue disabled ``` This is identical to `lion-checkbox`, `lion-radio` etc. ## Don't use as standalone > This component should not be used standalone. It is not accessible unless it is a child of a listbox-like element. This also explains the (intended) accessibility violation when viewing these demos in Canvas mode. For more details on usage, please see [lion-select-rich](?path=/docs/forms-select-rich--default-story).