Skip to content
Nana UI

Option

View .md Download

A selectable option for listbox / select / dropdown usage. Bubbles nana-select with its value and reflects selected / disabled.

Option one Option two
Terminal window
npm install @nana-tec/ui-components
import "@nana-tec/ui-components/option";
<nana-select label="Choose one" style="min-width:16rem">
<nana-option value="1">Option one</nana-option>
<nana-option value="2">Option two</nana-option>
</nana-select>

Properties

PropertyAttributeTypeDefaultDescription
activebooleanfalseActive (keyboard-highlighted) state — used by listbox parents like nana-combobox
descriptionstring | undefinedSecondary descriptive text
disabledbooleanfalseDisable the option
selectedbooleanfalseSelected state
valuestring''Value emitted on selection

Events

EventDescription
nana-selectFired on activation (`detail.value`)

Slots

SlotDescription
(default)The label
prefixLeading icon
descriptionSecondary text

CSS parts

PartDescription
::part(base)The option row
EventTypeDescription
nana-selectCustomEventFired on activation (detail.value)
SlotDescription
(default)The label
prefixLeading icon
descriptionSecondary text
PartDescription
baseThe option row
Explore Option interactively Every state, prop, and edge case — with live controls — in Storybook.
View in Storybook