Skip to main content

OptionCustom

<ui5-option-custom> | Since 2.0.0

The ui5-option-custom component defines a custom content of an option in the ui5-select. A component to be the same way as the standard ui5-option. The component accepts arbitrary HTML content to allow full customization.

ES6 Module Import​

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

Properties​

displayText​

DescriptionDefines the text, displayed inside the ui5-select input filed when the option gets selected.
Typestring | undefined
Defaultundefined

selected​

DescriptionDefines the selected state of the component.
Typeboolean
Defaultfalse

tooltip​

DescriptionDefines the tooltip of the option.
Typestring | undefined
Defaultundefined

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 content of the component.
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.