Child component of Dropdown

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

PropertyAttributeDescriptionTypeDefault
disableddisabled

When true, prevents interaction and decreases the component's opacity.

booleanfalse
hrefhref

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
iconEndicon-end

Specifies an icon to display at the end of the component.

IconName
iconFlipRtlicon-flip-rtl

When the element direction is right-to-left ("rtl"), flips the component's iconStart and/or iconEnd.

FlipContext
iconStarticon-start

Specifies an icon to display at the start of the component.

IconName
labellabel

Specifies an accessible label for the component.

string
relrel

Specifies the relationship to the linked resource defined in href.

string
selectedselected

When true, the component is selected.

booleanfalse
targettarget

Specifies the frame or window to open the linked resource.

string

Slots

NameDescription
default (unnamed)

A slot for adding text.

Styles

NameDescription
--calcite-dropdown-item-background-color-hover

Specifies the component's background color when hovered.

--calcite-dropdown-item-background-color-press

Specifies the component's background color when selected or active.

--calcite-dropdown-item-icon-color-hover
deprecated in v5.0.0, removal target v6.0.0 - Specifies the color of the component's selection icon when hovered.
--calcite-dropdown-item-icon-color-press

Specifies the color of the component's selection icon when selected or active.

--calcite-dropdown-item-text-color-press

Specifies the component's text color when selected or active.

--calcite-dropdown-item-text-color

Specifies the component's text color.

Events

NameDescriptionBehavior
calciteDropdownItemSelect

Fires when the component is selected.

bubblescomposed

Methods

NameDescriptionSignature
componentOnReady

Creates a promise that resolves once the component is fully loaded.

componentOnReady(): Promise<this>
setFocus

Sets focus on the component.

setFocus(options?: FocusOptions): Promise<void>

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.