Pickers

Pickers allow users to select content from a set of values, usually presented in a list or dropdown menu.

This article is quite lengthy. To quickly find the information you're looking for, consider using the search.

Overview

Different types of pickers can be used in forms. Choosing the right picker depends on the type of answers requested and their number.

Here is an overview to assist you in choosing the appropriate picker based on your use case. For more in-depth information, please refer to the details of each picker.

Item Selection

Select is the simplest picker. Allows users to choose one item from a option list. To use for 'simple' option lists that do not require back-end calls to retrieve options (eg. list of countries, language...)

For 3 options or less, use RadioGroup component.

  • Default Placeholder is manageable. See Content Guideline below.

  • Search bar is automatically shown for item lists with 20+ items

  • Group options into bundles with title separators to make it easier to read and understand.

  • Custom the field with optional props : Label, Requirement Indicator (Red Asterix), Tooltip, Placeholder Value and Helptext

Date/Time Selection

Time Picker is a component dedicated to time (hours & minutes). With this picker, users can select one item in the calendar.

When empty, Time Picker shows a 'time' icon on the far right corner (unlike Single Select, which uses a dropdown arrow).

Selection List items of Time Picker are customizable :

  • 'interval' (from 1 to 60): allows populating options with precise interval

  • Removing time before the current time

Inline advanced picker

The inline advanced picker triggers the advanced picker modal which is a key component to advanced selection. Once the items are selected, it displays a counter with "selected" as microcopy; you may override it.

Layout

For a clear form layout, follow these simple design rules:

  • Place inputs in a vertical sequence, each stretching across the full panel width for a clean look.

  • If you're aligning inputs side-by-side, leave a 16px gap between them to prevent clutter.

  • Similarly, when stacking inputs vertically under a single label, keep a 16px space for clear separation.

Content

Label

Use a noun, no preposition, no action verb.

Template: <Noun>

Default Placeholder State for Select

Template: - - Select - - or <Most logical option - Default>

How to choose the right placeholder

When a clear and logical default choice is evident, pre-select it, while also allowing users the option to override it. For example, in language selection, 'English' is initially chosen but can be modified by the user. In such instances, we recommend informing the user this default choice was made on their behalf by explicitly marking it as the 'default' selection. In this scenario, the component will always have a value, eliminating the possibility of it being null, and consequently, the picker will never be in an error state. This approach obviates the need to designate the picker as 'mandatory' to avoid rendering an ineffectual verification step.

When no option presents a clear logical choice, employ a 'blank option,' such as '- - Select - -', to guide users in making their decision. It's important to note that the 'blank option' is not a valid response for required fields and will result in an error if users attempt to save the form with this selection. In this scenario, the component can be clearly stated as mandatory.

Help text

Prefer a help text over a tooltip to add extra details, and explain how to fill the field or its purpose. If you are just repeating yourself, don’t use a help text.

Template: <Optional sentence giving extra information on how this content will be used or why it's important.>

Tooltip

Tooltip appears when hovering the ? icon or a disabled button. They are not used to communicate critical information but to provide additional information.

Template: <Extra info in one sentence, not critical info but additional guidance. Did you know?>

Key takeaways

Do

  • Consider whether to display a default value or prompt users to select one when using a picker component

  • Asynchronous components are meant for complex selection lists.

  • Use predictable and logically ordered values

  • Always report to form patterns

Don't

  • Avoid imposing an illogical pre-selection as the default state

  • Use DateTimeRange for a single date, even if it's technically possible

  • Consider providing less granularity when specifying minutes in a date picker.

  • Create new/custom behavior patterns with form components

Last updated