SelectPanel
The SelectPanel is an anchored dialog that allows users to quickly navigate and select one or multiple items from a list. It includes a text input for filtering, supports item grouping, and offers a footer for additional actions. Changes are applied upon closing the panel.
Page navigation navigation
React examples
Single-select
Multi-select
When users search for new items, maintain their current selections and use a minimal loading state to indicate ongoing activity.
Grouped items
Items can be grouped to provide additional context or to visually separate them. Each group can have a title for better organization.
Items with leading visuals
Items with dividers
With header
With a footer
An optional footer at the bottom can include a link or button for additional actions.
Loading
Provide visual cues to users when processes may take longer than expected. Use loading states to communicate results are loading. Use when retrieving initial data to prevent users from seeing an empty list.
Other label options
If the button represents the current selection, it must have an associated label, either internally (within the button) or externally (adjacent to the button).
Visually hidden label
Internal label
Custom (external) anchor
To use an external anchor, pass an anchorRef
to SelectPanel
. You will also need to manually toggle the open
prop when activating the custom anchor.
Props
SelectPanel
Name | Required | Description |
---|---|---|
items | Required | ItemInput[] A collection of `Item` props and `Item`-level custom `Item` renderers. |
title | string | React.ReactElement A descriptive title for the panel | |
subtitle | string | React.ReactElement When provided, a subtitle is displayed below the title | |
onOpenChange | Required | ( open: boolean, gesture: | 'anchor-click' | 'anchor-key-press' | 'click-outside' | 'escape' | 'selection' ) => void |
placeholder | string Text used in anchor when there are no selected items | |
placeholderText | string Text used as placeholder for search input | |
inputLabel | string The aria-label for the filter input | |
aria-label | string aria-label to attach to the base DOM node of the list | |
filterValue | string The current value of the search input | |
selected | Required | ItemInput | ItemInput[] | undefined Specify the selected item(s) |
open | Required | boolean Determines whether the overlay portion of the component should be shown or not |
anchorId | string An override to the internal id that will be spread on to the renderAnchor | |
anchorRef | RefObject<HTMLElement> An override to the internal renderAnchor ref that will be used to position the overlay.
When renderAnchor is null this can be used to make an anchor that is detached from ActionMenu.
An override to the internal ref that will be spread on to the renderAnchor | |
onSelectedChange | Required | (selected: ItemInput | ItemInput[]) => void Provide a callback called when the selected item(s) change |
onFilterChange | (value: string, e: ChangeEvent<HTMLInputElement>) => void Callback when the search input changes | |
overlayProps | Partial<OverlayProps> See [Overlay props](/react/Overlay#props). | |
textInputProps | Partial<Omit<TextInputProps, 'onChange'>> See [TextInput props](/react/TextInput#props). | |
footer | string | React.ReactElement Footer rendered at the end of the panel |