Skip to content

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.

FieldTypeDefaultDescription
valuestring | number—The value the selector reports when this option is chosen. Required, and unique inside one list.
labelstring—Primary text of the row, and its accessible name. Required.
descriptionstring—Secondary text under the label. Its own line, smaller and quieter than the label.
iconstring—Icon drawn before the label, given as a CSS icon class such as i-carbon-user.
disabledbooleanfalseKeeps 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.