Skip to main content

Adaptive Select

Usage

The adaptive select provides a touch-friendly alternative to HTML selects, checkboxes, and radio buttons on small screens and slide out panels. It has two parts: a menu trigger and a select list (single or multi) embedded in a slide out panel.

Common Characteristics

The menu trigger is always 48px tall with a white background. Width varies with breakpoint or container (e.g. a card or slide out). Each selector in the select list is 48px tall with a white background. The select list always appears in a slide out. The slide out width can be determined by the designer to suit the needs of the content.

Options

Icons and Chips

The menu trigger can have an optional icon to the left of the label. Selectors can appear with filter counts on light chips.

Multi-Select

The adaptive select can be used for single select or multi-select. The multi-select option includes a “Select all” toggle and a “Done” function that submits selections.

Code

Default Adaptive Select

Live Editor
Result
Loading...

Adaptive Select with Label Icon

Live Editor
Result
Loading...

Adaptive Select with Option Chip Counts

Live Editor
Result
Loading...

Adaptive Select with Multi Select

Live Editor
Result
Loading...

Adaptive Select Required & Disabled

Live Editor
Result
Loading...

Props

Adaptive Select

NameTypeDefaultDescription
labelstring""Main label for the Adaptive Select
labelIconstring""Sets icon for main label. Accepts any Prism icon slug.
selctionsarray[]An array of value strings to set initial selections
optionsarray[]An array of objects that define Adaptive select options. See below for options object definition
multiselectbooleanfalseToggles multiselect on or off.
requiredbooleanfalseToggles required icon on or off. This is for display only, it is up to the implementor to define validation logic.
disabledbooleanfalseToggles disabled state on or off.
onChangefunctionnullCallback function to be excuted when selections are made. Recieves an array of selected values as a parameter.
viewNamestring""If set, the back button on the slide out uses this as its label.
placeholderstring""Shows a placeholder if there is no selection

Option Object Properties

NameTypeDescription
labelstringLabel displayed in the slide out for this option.
valuestring (optional)If set, allows value for this option, which is passed back to the app with the onChange callback to be different from the option label.
countnumber (optional)Ads a chip with a comma formatted string for this option in the slide out.