Provides options within dropdowns.
To be used with the following components:
q2-select
(Link)q2-pill
(Link)q2-tag
(Link)q2-optgroup
(Link)The q2-option
element has one or more properties that support text localization. Those properties are indicated by the localizable badge in the description.
disabled
Disables the option.
display
The text that is displayed in the field when selected. If not provided, any text inside the element will be used.
separator
Renders a line in the item instead of text.
Click events from these items will not have details provided.
A separator
allows for quick visual grouping of items, so interactions should not be bound to these options.
value
Serves as the option's value.
The q2-option
element exposes events that can be used to send and receive data from the component based on user interaction.
Used by consuming elements to indicate the display value of the option has changed.
{ value: string; display: string; }
Is emitted when the option is clicked.
{ type: "select" | "remove"; value: string; }
This component uses other components in the Tecton library, including:
q2-icon
Other components in the Tecton library use this component, including:
q2-action-sheet
q2-pagination
Initial Release
Supports nested q2-loc element
The following CSS variables are available to override the default theme styles of the q2-option
component.
Many Tecton components consume other components to maintain visual and functional consistency. If you are looking for a CSS variable you think should exist but are not seeing it, it may be defined in one of the dependent components below. Either way, if you think it's something we should expose more conveniently, let us know!