Select panel

The Select Panel 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.

Interface showing selectable options for events, users, languages, and projects. Events include Announcements, Releases, Sponsors, Stars, and Repositories. User selection shows profiles such as six7, maximedegrve, TheDamianHdez. Language options include C, C#, C++, CoffeeScript, CSS, Dart, DM, Elixir. Project selection shows Proxima issues from multiple tests and other repositories.

Options

Single Selection

Select panel titled Change author with a search bar and a list of names including Jan Six, Maxime De Greve, Damian Hernandez, Joyce Lau, Lee Reilly, Gavin Nelson, Amy Burns, Lerè, Cole Bemis, Lukas Oppermann, and Sophie Shepherd.

For single-item selection, the panel closes immediately upon selection. The selected item is indicated by a checkmark. Set the selectionVariant prop on ActionList to single.

Multi Selection

Set labels select panel showing various labels including a11y design (checked), a11y sign-off, accessibility, area: accessibility, at risk, and blocked with a search bar at the top.'

For multi-item selection, the panel remains open after each selection, allowing users to choose multiple items before closing the panel to confirm their choices. Selections are visually indicated by faux checkboxes. Set the selectionVariant prop on ActionList to multiple.

Groups

Items can be grouped to provide additional context or to visually separate them. Each group can have a title for better organization.

Select panel showing a list of users with checkboxes and names including Gavin Nelson, Amy Burns, Léré, Cole Bemis, Lukas Oppermann, and Sophie Shepherd. Below is an 'Add a new user' button. Adjacent is a labels select panel section with checkboxes for labels 'accessibility', 'at risk', and 'blocked', along with a 'Manage labels' link in the footer.

An optional footer at the bottom can include a link or button for additional actions.

Opening

Three buttons displayed: a gear icon button labeled 'Icon button', a dropdown button labeled 'Assignees: 2 people' with 'Button (internal label)' below, and another dropdown button labeled 'Assignees' with '2 people' as value and 'Button (external label)' below.

Select panels can be activated via a semantic button, which can be either a regular button or an icon button. If the button represents the current selection, it must have an associated label, either internally (within the button) or externally (adjacent to the button).

Anatomy

Label selection select panel with the options a11y design, a11y sign-off, accessibility, area: accessibility, at risk, and blocked, each with corresponding checkboxes. The header, list, input and footer is annotated.

The select panel consists of three main areas: a header, a scrollable list that can be filtered, and an optional footer:

  • Header: Includes a title and a close button.
  • Input and List (scrollable): The scrollable list contains action list items, which can be either single or multi-select options. The input field allows users to quickly filter the list.
  • Footer: Can contain an actionable button.

Best Practices

Empty State

Screen showing two search panels side by side. The left panel titled 'Set project' with a search bar displaying 'Search' and a message below stating 'You haven't created any projects yet' followed by 'Start your first project to organise your issues.' The right panel titled 'Filter by language' with a search bar containing 'CSA' and a message below stating 'No language found for CSA' followed by 'Adjust your search term to find other languages.' Both panels have no items or matches

When no results are available, offer users an explanation instead of leaving a blank space. There can be various reasons for the absence of results. It could be due to the search or filter input value not matching any available data, or it could be because the user has yet to generate any data to display.

Loading

Three stages of an 'Assign people' select panel. The first stage shows an empty search bar with a spinner and 'Fetching people...' text. The second stage displays the same search bar with skeleton loaders. The third stage shows a search for 'six' with a list of users, including avatars and names such as 'Jan Six', 'Manuel Muñoz Solera', and 'Vinicius Depizzol'.

Provide visual cues to users when processes may take longer than expected. Use loading states at different stages to communicate effectively.

  1. Initial: Use when retrieving initial data to prevent users from seeing an empty list.
  2. Initial (skeleton): Use a skeleton loader when retrieving initial data to prevent users from seeing an empty list.
  3. Searching/Filtering: When users search for new items, maintain their current selections and use a minimal loading state to indicate ongoing activity.

Current Selection

Three dropdown menus labeled Filter by language. The first menu on the left, labeled Default, shows the default state with C (first) and DM (fourth) selected. The middle menu, labeled After making a selection, shows C (first), C# (second), and DM (fourth) selected. The right menu, labeled When filtering, shows filtering with the search term C, displaying C (first) and C# (second) selected.

To make the current selection clear, display the selected items at the beginning of the list. This behavior should occur when opening the select panel, after users clear the input or when they change the filter value. Avoid reordering items after selection to prevent disorientation.

Error/Warning Handling

Two side-by-side author select panels with titles "Default values fail to load" (left) and "Search fails" (right). Left dialog shows "We couldn’t load the authors" with a red warning icon, search bar, placeholder text: "Try again or if the problem persists contact support." Right dialog shows search for "max," listing authors including "six7," "maximedegreve," and others, but an error states "We couldn’t load the authors" with a red warning icon below the title.

When things don't work as expected, or users need to be informed about important issues, we handle these scenarios appropriately. If default values fail to load, we display an error placeholder to inform the user. When users search for new values and the search fails, we display an error message above the input.

Behavior

The select panel opens when the trigger button is activated by a click, Enter, or Space.

Interactions

Focus is initially placed on the input field and the first item in the list, which are connected as one focusable entity. Users can type to filter the list or navigate using ArrowUp and ArrowDown.

Apply Changes

Closing the select panel applies all changes. It can be closed by clicking the trigger button again, the close button, clicking outside the panel, or pressing the Esc key.

Keyboard Navigation

KeyDescription
TabMove focus forward between interactive controls and widgets within the dialog.
Shift + TabMove focus backward between interactive controls and widgets within the dialog.
EnterSelect items in the list or activate buttons or links within the select panel.
SpaceType a space in the input or activate buttons or links within the select panel.
ArrowDownNavigate forward through items in the list. If focus is on the last item, ArrowDown moves focus to the first item.
ArrowUpNavigate backward through items in the list. If focus is on the first item, ArrowUp moves focus to the last item.
HomeMove focus to the first item in the list.
PageUpMove focus to the first item in the list.
EndMove focus to the last item in the list.
PageDownMove focus to the last item in the list.
EscApply changes and close the select panel.