Overview
Each Dropdown Item must be contained within a parent Dropdown Group. This allows multiple Dropdown Group to exist within one Dropdown.
API reference
Properties
| Property | Attribute | Description | Type | Default |
|---|---|---|---|---|
| disabled | disabled | When true, interaction is prevented and the component is displayed with lower opacity. | boolean | false |
| href | href | Specifies the URL of the linked resource, which can be set as an absolute or relative path. Determines if the component will render as an anchor. | string | |
| iconEnd | icon-end | Specifies an icon to display at the end of the component. | string | |
| iconFlipRtl | icon-flip-rtl | Displays the iconStart and/or iconEnd as flipped when the element direction is right-to-left ("rtl"). | "both" | "end" | "start" | |
| iconStart | icon-start | Specifies an icon to display at the start of the component. | string | |
| label | label | Accessible name for the component. | string | |
| rel | rel | Specifies the relationship to the linked document defined in href. | string | |
| selected | selected | When true, the component is selected. | boolean | false |
| target | target | Specifies the frame or window to open the linked document. | string |
Slots
| Name | Description |
|---|---|
| default (unnamed) | A slot for adding text. |
Styles
| Name | Description |
|---|---|
| --calcite-dropdown-item-background-color-hover | Specifies the item's background color when hovered. |
| --calcite-dropdown-item-background-color-press | Specifies the item's background color when selected or active. |
| --calcite-dropdown-item-icon-color-hover | |
| --calcite-dropdown-item-icon-color-press | Specifies the item's icon selection color when selected or active. |
| --calcite-dropdown-item-text-color-press | Specifies the item's text when selected or active. |
| --calcite-dropdown-item-text-color | Specifies the item's text color. |
Events
| Name | Description | Behavior |
|---|---|---|
| calciteDropdownItemSelect | Fires when the component is selected. |
Methods
| Name | Description | Signature |
|---|---|---|
| componentOnReady | Create a promise that resolves once component is fully loaded. | componentOnReady(): Promise<void> |
| setFocus | Sets focus on the component. | setFocus(options?: FocusOptions): Promise<void> |