Skip to main content

Option

<ui5-option>

The ui5-option component defines the content of an option in the ui5-select.

ES6 Module Import​

import "@ui5/webcomponents/dist/Option.js";

Properties​

additionalText​

DescriptionDefines the additionalText, displayed in the end of the option.
Typestring | undefined
Defaultundefined
Since1.0.0-rc.15

icon​

DescriptionDefines the icon source URI.
Note: SAP-icons font provides numerous built-in icons. To find all the available icons, see the Icon Explorer.
Typestring | undefined
Defaultundefined

selected​

DescriptionDefines the selected state of the component.
Typeboolean
Defaultfalse
Deprecatedsince 2.20.0, please use the parent Select's value property instead.

tooltip​

DescriptionDefines the tooltip of the option.
Typestring | undefined
Defaultundefined
Since2.0.0

value​

DescriptionDefines the value of the ui5-select inside an HTML Form element when this component is selected. For more information on HTML Form support, see the name property of ui5-select.
Typestring | undefined
Defaultundefined

Slots​

default​

DescriptionDefines the text of the component.
Note: Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.
TypeArray<Node>

Events​

click​

DescriptionFired when the component is activated either with a mouse/tap or by using the Enter or Space key.
Note: The event will not be fired if the disabled property is set to true.
TypeCustomEvent<ListItemBaseClickEventDetail>
ParametersoriginalEvent: Event
The original event from the user interaction.
Since2.23.0
BubblesYes
CancelableNo

Methods​

No methods available for this component.

CSS Parts​

No CSS parts available for this component.

CSS Custom States​

No CSS custom states available for this component.