> For the complete documentation index, see [llms.txt](https://design.mirakl.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://design.mirakl.com/~/changes/DpgERwSwrKIthStzL4D6/components/form/pickers.md).

# Pickers

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

<figure><img src="https://1297765105-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMoZPkWOmnKvoMWGW4aeM%2Fuploads%2FLilnKAXG9lzLJ7DmxFjf%2FPickers%20Hero.png?alt=media&amp;token=a7490533-55dc-4a58-b18d-f49163570362" alt=""><figcaption></figcaption></figure>

## Overview

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

### Select <a href="#id-90df62" id="id-90df62"></a>

`Select` is the most basic picker element. It lets the user select one item within a list of provided options. This component will be preferred for small lists (approx. 15 items) that do not require the specific features of `Async Select.`

{% hint style="info" %}
&#x20;For 3 options or less, use RadioGroup component.
{% endhint %}

Within the Selection List, you may arrange options by bundles with title separators. Learn more about Selection List.

We provide multiple features to custom the field, such as: `Label`, `Requirement Indicator` (Red Asterix), `Tooltip`, `Placeholder Value` and `Helptext`

<figure><img src="https://1297765105-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMoZPkWOmnKvoMWGW4aeM%2Fuploads%2FQsqoeKoSwafbKsKe1qFU%2FPickers%20Example.png?alt=media&amp;token=8f1855cc-d886-4a0e-b06f-7581bf727ff8" alt=""><figcaption><p><strong>The placeholder value at its default state</strong></p></figcaption></figure>

&#x20;

**How should I set my Select Component to its default state?**

If there is one answer that seems more logical within all options, it would be a good practice to fill it as a pre-selected but overridable answer.

* *Example: As a user, I want to set my platform language. On the settings page, the component* `Select` *is already set on the "English" value because it is the most preferred language in my company. But still, I can edit it if I need to.*

However, if no options seem more logical as a default choice, it would be a better option to prefill with a "blank option" : `- - Select - -`. It will guide users to make their own choice.

* *Example: As a user, I must fill in my personal information, including my civility. Because I did not provide any information about it beforehand, the field at its default state should remain empty with a placeholder.*

**Note:** This blank option will not be considered a correct answer for a required field. If users try to save the form, the component will be in error state. Learn more about errors in forms

### Async Select <a href="#id-636e61" id="id-636e61"></a>

<figure><img src="https://1297765105-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMoZPkWOmnKvoMWGW4aeM%2Fuploads%2FzMFf3pCYLMooLhjFz6lU%2FPickers%20Async.png?alt=media&amp;token=b7ed37b8-a884-4f6a-828f-922e7b5b5337" alt=""><figcaption></figcaption></figure>

`Async Select` is a variation of `Select` component. It lets users select one item within a provided list of options. It has the same core design guideline.

However, **this variant is specifically made for a long and/or complex list of options**.

From a technical perspective, the options list will be recovered only when users open `Async Select` component. It means a potential loading state. Also, this component allows a partial loading of options which is a real comfort for technical performances.

With this component, users can search for their answers in an integrated `Search Bar`.

### Multi Select <a href="#id-40abdf" id="id-40abdf"></a>

<figure><img src="https://1297765105-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMoZPkWOmnKvoMWGW4aeM%2Fuploads%2FMBgvwSO0piJgUfuMW2SN%2FMultiselect.png?alt=media&amp;token=3844296b-b3f0-460c-b0d4-56925868148e" alt=""><figcaption></figcaption></figure>

`Multi Select` is a form component that lets users select multiple items from a list. Users are not limited in the number of answers.

On empty mode, `Multi Select` is distinguished by its "+" ("add") icon on the far right corner (rather than a dropdown arrow for a `Single Select`).

`Selection List` opens in an overlay when the user clicks on the field. To each line, a checkbox + blue background appear when selected. Also, for each chosen line, a corresponding chip populates the field.

`Selection List` stays open until users click on CTA "*Done*".

{% hint style="info" %}
If users click outside of `Selection List`, the selection is still saved.
{% endhint %}

Users can unselect a value by clicking on the "x" ("remove") icon of its [chips](https://mirakl.zeroheight.com/styleguide/s/42502/p/310752-chips) or by unchecking the line in the `Selection List`. They can also clear the whole selection with the Secondary Button in the dropdown "*Clear*".

Once the selection is made and the overlay is closed, the picker will only show **the first 8 values** (overridable setting) with chips. A " `Show More` / `Show Less` " action appears in the input to let users manage the overview.

With this component, users can search for their answers in an integrated `Search Bar` when the list has more than 20 items.

When disabled with value, the picker shows all the selected values and cannot be collapsed.

### Async Multi Select <a href="#id-8288e0" id="id-8288e0"></a>

<figure><img src="https://1297765105-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMoZPkWOmnKvoMWGW4aeM%2Fuploads%2FpcPCuGyvTDDjlS6pj16g%2FAsyncMultiSelect.png?alt=media&amp;token=95008cf3-e1d8-435e-bb8f-cbb1f5093a0c" alt=""><figcaption></figcaption></figure>

`Async Multi Select` is a variation of `Multi Select` component. It allows users to select multiple items within a list. It has the same core design guideline.

However, **this variant is specifically made for a complex list of options**. Whether because of the large number of choices or because of long labels, etc ... With this component, users can search for their answers in an integrated `Search Bar`. Moreover, this component allows partial loading of the `Selection List` , which is a real comfort for technical performances.

💡To introduce the search bar, the placeholder text is "Search..."

### Time Picker <a href="#id-027d02" id="id-027d02"></a>

<figure><img src="https://1297765105-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMoZPkWOmnKvoMWGW4aeM%2Fuploads%2FMgZIol8dFMzNKHG3F4kI%2FTimePicker.png?alt=media&amp;token=74b1f317-9660-4409-9ff2-3b38ffd2d80f" alt=""><figcaption></figcaption></figure>

`Time Picker` is a `Select` component dedicated to time (hours & minutes). It can be distinguished from a `Select` by its "*Time*" icon on the far right corner of the field, but it has the same overall behavior.

`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

### Date Picker <a href="#id-9599c3" id="id-9599c3"></a>

<figure><img src="https://1297765105-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMoZPkWOmnKvoMWGW4aeM%2Fuploads%2FlZGbokDZe8JWK4HLsg1H%2FDatePicker.png?alt=media&amp;token=15bfc2fc-7088-4ed2-be1c-99b3d583b7cc" alt=""><figcaption></figcaption></figure>

`Date Picker` is the simplest dedicated component to let the user select **a date value**. With this picker, users can only select one day in the calendar (no range, no time).

`Date Picker` is distinguished by its "calendar" icon on the far right corner of the field. Also, the `Placeholder` "*Select date*" helps users to understand they have to select a precise day.

⚠️ **Inputs are unwritable.** Users cannot enter a date manually. Choosing a date from the calendar is the only way to select a value.

When the user clicks the field, a calendar overlay appears with different actions and information (see below). The overlay is dismissed once one chooses a date. The chosen date populates the field. Users can always change the selected date or erase their selection by clicking on the "x" ("delete") icon.

&#x20;

*Timezone information appears automatically and only if the users' locale is different from the platform timezone.*

💡 A mobile version of the calendar is automatically displayed on small screens.

### Daterange Picker <a href="#id-66e7b2" id="id-66e7b2"></a>

<figure><img src="https://1297765105-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMoZPkWOmnKvoMWGW4aeM%2Fuploads%2FFjxFN1fEDFU5V5qIy8Qp%2FDateRangePicker.png?alt=media&amp;token=7fbcf819-5c85-4136-8eed-ee680a0b7ff8" alt=""><figcaption></figcaption></figure>

`Daterange Picker` is a variation `Date Picker` component. With this picker, users are invited to select **a period**, not only a single date. It has the same behaviors as `Date Picker`.

Its only differences are the `Placeholder` text "*Select a period*" to help users understand they must select a period. Also, the calendar overlay shows two months in a row rather than only one for a `Date Picker`.

It is possible to force a given time range, e.g. 4 days minimum.

{% hint style="warning" %}
This component is made for users to select a range with **two different values (a start date and an end date)**. While it's still possible to select the same value for both (ending with users selecting a range of a unique day), this behavior should not be encouraged.
{% endhint %}

### DateTimerange Picker <a href="#id-64bced" id="id-64bced"></a>

<figure><img src="https://1297765105-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMoZPkWOmnKvoMWGW4aeM%2Fuploads%2FCF5IijBwSIpXdAMSn1li%2FDateTimeRangePicker.png?alt=media&amp;token=56fda3c7-c92c-4fc5-8659-53b0861009d6" alt=""><figcaption></figcaption></figure>

`DateTimerange Picker` is the most complete version of pickers dedicated to dates and times. It allows users to select a date range and to associate a precise time of the day. Time selection is optional.

Unlike other pickers and because of its complexity, `DateTimerange Picker` overlay opens in a modal when the user clicks on the field.

<figure><img src="https://1297765105-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMoZPkWOmnKvoMWGW4aeM%2Fuploads%2FbzZqKv1l3SpzOCl6KATu%2FDateTimeRangePicker%20Modal.png?alt=media&amp;token=b4fa2c15-c349-4d68-8bf7-b7fa85d22e6e" alt=""><figcaption><p>Modal for the Date Time Range Picker</p></figcaption></figure>

### Inline advanced picker <a href="#id-5390ca" id="id-5390ca"></a>

<figure><img src="https://1297765105-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMoZPkWOmnKvoMWGW4aeM%2Fuploads%2FsVFXKWjHWBH2MSLYq7fV%2FinlineAdvancedPicker.png?alt=media&amp;token=384c9f7e-764d-49fe-86c1-d4b7027833af" alt=""><figcaption></figcaption></figure>

\
The inline advanced picker triggers the advanced picker modal which is a key component to [advanced selection](/~/changes/DpgERwSwrKIthStzL4D6/patterns/advanced-selection.md). Once the items are selected, it displays a counter with "selected" as microcopy; you may override it.

## Accessibility <a href="#id-2109a1" id="id-2109a1"></a>

`Label` is not mandatory, as we might need to overstack several pickers for a single label. However, this practice should be used sparingly with caution.

It can be overwhelming or difficult for some people to understand how to fill an input without a label. We recommend defining a label adjacent to the field.

In cases where we overstack several pickers for a single label, the gap between each field should be minimal (16px max).

## Key takeaways <a href="#id-8864e6" id="id-8864e6"></a>

{% hint style="success" %}

* Use placeholder to guide users in their selection
* Think wise about the volume of items in the Selection List, should your component be Async.
* Use predictable and logically ordered values
* Always report to form patterns
  {% endhint %}

{% hint style="danger" %}

* Force an unlogical pre-selection as the default state
* Use DateTimeRange for a single date
* Consider providing less granularity when specifying minutes in a date picker.
* Create new/custom behavior patterns with form components
  {% endhint %}

## Content

#### Select <a href="#id-49a5a7" id="id-49a5a7"></a>

Default text is always -- **Select** --.

#### Async Select <a href="#id-0727f5" id="id-0727f5"></a>

Default text is always -- **Select** --.

Search placeholder text is always **Search**.

#### Multi Select <a href="#id-27d8f0" id="id-27d8f0"></a>

Primary CTA is always **Apply**.

Secondary CTA is always **Cancel**.

<br>

#### Async Multi Select <a href="#id-5962e9" id="id-5962e9"></a>

Default text is always -- **Select** --.

Search placeholder text is always **Search**.

Primary CTA is always **Apply**.

Secondary CTA is always **Cancel**.

#### Time Picker <a href="#id-958ecc" id="id-958ecc"></a>

Placeholder text is always **Select time.**<br>

#### Date Picker <a href="#id-4148f5" id="id-4148f5"></a>

Placeholder text is always **Select date.**

Primary CTA is always **Apply**.

Secondary CTA is always **Cancel**.

<br>

#### Daterange Picker <a href="#id-797ffa" id="id-797ffa"></a>

Placeholder text is always **Select period.**

Primary CTA is always **Apply**.

Secondary CTA is always **Cancel**.

<br>

#### DateTimerange Picker <a href="#id-7119b8" id="id-7119b8"></a>

Placeholder text is always **Select period.**

Primary CTA is always **Apply**.

Secondary CTA is always **Cancel**.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://design.mirakl.com/~/changes/DpgERwSwrKIthStzL4D6/components/form/pickers.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
