Dropdowns are floating lists that can be revealed by an event such as a button click.
Overview
Dropdowns can be single or multi-selectable lists. Every Dropdown Item must have a parent Dropdown Group. For more information, refer to Grouping Dropdown Items.
Sample
Component comparison
selectionMode property.selectionMode options, including single and multiple selection.Usage
- Filter and sort interactions
- Selection lists
Best practices
Grouping Dropdown Items
Every Dropdown Item must have a parent Dropdown Group.
Use multiple Dropdown Groups within a single Dropdown to allow a user to make independent selections from each. For example, a Dropdown could include separate Dropdown Groups for sorting by date, name, and rating. Selections in one Dropdown Group do not affect selections in other Dropdown Groups, and each Dropdown Group can define its own selectionMode.
When a Dropdown Group's selectionMode is set to "none", the group can categorize related items within a Dropdown. Grouping related items under meaningful titles creates a collection of items, which is useful for users to find items more readily.


selectionMode set to "none" to categorize items within a Dropdown.Use Button or Action as reference elements
Dropdowns should be invoked by an interactive reference element such as Button or Action. The components are designed to initiate interactions, making them good choices for activating a Dropdown. Use the referenceElement property to associate a Dropdown with its reference element and position it relative to that element.


Keep multi-select Dropdowns open after selection
When a Dropdown Group has selectionMode set to "multiple", consider setting closeOnSelectDisabled to true to allow multiple selections without needing to reopen the Dropdown.
closeOnSelectDisabled to true when selectionMode is set to "multiple".Accessibility
Keyboard navigation
| Key | Function |
|---|---|
Arrow down | If the component is not open, opens the component. When open, moves focus to next non-disabled calcite-dropdown-item. If the current focus is the last calcite-dropdown-item, focus will cycle to the first calcite-dropdown-item. |
Arrow up | If the component is not open, opens the component. When open, moves focus to previous non-disabled calcite-dropdown-item. If the current focus is the first calcite-dropdown-item, the focus will cycle to the last calcite-dropdown-item. |
Esc | If the component is open, closes the component. |
Home | Moves focus to the component's first calcite-dropdown-item. |
End | Moves focus to the component's last calcite-dropdown-item. |
Enter | Selects the active calcite-dropdown-item and when close is false (default), closes the component. |
Space | Selects the active calcite-dropdown-item and when close is false (default), closes the component. |
Tab | Moves focus in and out of the component. |
Tab and Shift | Moves focus in and out of the component. |
API reference
Properties
| Property | Attribute | Description | Type | Default |
|---|---|---|---|---|
| closeOnSelectDisabled | close-on-select-disabled | When If the | boolean | false |
| disabled | disabled | When | boolean | false |
| flipPlacements | Specifies the component's fallback | FlipPlacement[] | ||
| maxItems | max-items | Specifies the maximum number of | number | 0 |
| offsetDistance | offset-distance | Specifies the distance to position the component away from the | number | 0 |
| offsetSkidding | offset-skidding | Specifies the distance to position the component along the | number | 0 |
| open | open | When | boolean | false |
| overlayPositioning | overlay-positioning | Specifies the type of positioning to use for overlaid content, where:
| OverlayPositioning | "absolute" |
| placement | placement | Determines the component's placement relative to the container element. | LogicalPlacement | "bottom-start" |
| referenceElement | reference-element | The Setting the value to an However, a string The component should not be placed within its own | ReferenceElement | string | null | |
| scale | scale | Specifies the size of the component. | Scale | "m" |
| selectedItems | The component's selected items. | DropdownItem[] | ||
| topLayerDisabled | top-layer-disabled | When Only set this if you need complex z-index control or if top layer placement causes conflicts with third-party components. | boolean | false |
| type | type | Specifies the type of action on the container element to open the component. | "hover" | "click" | "click" |
| width | width | Specifies the component's width. | Extract<Width, Scale> | |
| widthScale | width-scale | width property instead.Specifies the component's width. | Scale |
Slots
| Name | Description |
|---|---|
| default (unnamed) | A slot for adding |
| trigger | referenceElement property instead. A slot for the element that triggers the component. |
Styles
| Name | Description |
|---|---|
| --calcite-dropdown-width | Specifies the width of the component's wrapper. |
| --calcite-dropdown-background-color | Specifies the component's background color. |
Events
| Name | Description | Behavior |
|---|---|---|
| calciteDropdownBeforeClose | Fires when the component is requested to be closed and before the closing transition begins. | |
| calciteDropdownBeforeOpen | Fires when the component is added to the DOM but not rendered, and before the opening transition begins. | |
| calciteDropdownClose | Fires when the component is closed and animation is complete. | |
| calciteDropdownOpen | Fires when the component is opened and animation is complete. | |
| calciteDropdownSelect | Fires when a |
Methods
| Name | Description | Signature |
|---|---|---|
| componentOnReady | Creates a promise that resolves once the component is fully loaded. | componentOnReady(): Promise<this> |
| reposition | Updates the component's position. | reposition(delayed?: boolean): Promise<void> |
| setFocus | Sets focus on the component's first focusable element. | setFocus(options?: FocusOptions): Promise<void> |