Selector Option
@astryxdesign/core v0.7.1 · SelectorOption
Props
The fields of a SelectorOption object. These are data, not attributes: they go into the options array of a Selector, or arrive in the option slot.
| Field | Type | Default | Description |
|---|---|---|---|
value | string | number | — | The value the selector reports when this option is chosen. Required, and unique inside one list. |
label | string | — | Primary text of the row, and its accessible name. Required. |
description | string | — | Secondary text under the label. Its own line, smaller and quieter than the label. |
icon | string | — | Icon drawn before the label, given as a CSS icon class such as i-carbon-user. |
disabled | boolean | false | Keeps the option in the list but stops it from being chosen. The arrows skip it. |
Slots
The option slot of a Selector replaces the content of one row. It receives option (the object above), isActive (the row the pointer or keyboard is on), and isSelected.