Skip to content

VOption

An Option Custom HTML Element. Implements https://www.w3.org/TR/wai-aria-1.1/#option | ARIA option .

Props

NameTypeDescription
checkedEnum:
false
true
The checked state is used when the parent listbox is in multiple selection mode. To avoid accessibility conflicts, the checked state should not be present in single selection mode.
connotationEnum:
accent
cta
Sets the connotation that appears when selected
default-selectedbooleanSets the option's initial selected state (mirrors the native selected attribute)
disabledbooleanThe disabled state of the option.
iconEnum:
10-sec-backward-line
10-sec-backward-solid
10-sec-forward-line
10-sec-forward-solid
30-sec-backward-line
30-sec-backward-solid
30-sec-forward-line
30-sec-forward-solid
5-sec-backward-line
5-sec-backward-solid
5-sec-forward-line
5-sec-forward-solid
... 1266 more ...
A decorative icon the custom element should have. See the Vivid Icon Gallery for available icons and icon-names See the Vivid Icon Gallery for available icons: https://icons.vivid.vonage.com/
icon-trailingbooleanIndicates the icon affix alignment.
labelstring
matched-textstringText to highlighted as matching a search query
selectedbooleanIndicates whether the option is currently selected
selected-attributeboolean
tag-connotationEnum:
accent
cta
When displayed as a tag, the connotation of the tag
textstring
text-secondarystringSecondary text displayed below or next to the primary text
valuestringThe value of the option.

Events

NameEvent TypeDescription
blurFocusEventFires when the element loses focus.
clickMouseEventFires when a pointing device button (such as a mouse's primary mouse button) is both pressed and released while the pointer is located inside the element.
focusFocusEventFires when the element receives focus.
inputEventFires when the value of an element has been changed.
keydownKeyboardEventFires when a key is pressed.
keyupKeyboardEventFires when a key is released.

Slots

NameDescription
iconThe preferred way to add an icon to the component.
tag-iconIcon to be displayed in the tag when selected inside of Searchable Select.
trailing-metaFor additional elements at the end of the Option.