Choice list

A choice list lets you create a list of grouped radio buttons or checkboxes. Use this component if you need to group together a related list of interactive choices.


Examples

Use when you need merchants to make a single selection from a list of choices.

Drag to resize example
<ChoiceList
  title="Company name"
  choices={[
    {label: 'Hidden', value: 'hidden'},
    {label: 'Optional', value: 'optional'},
    {label: 'Required', value: 'required'},
  ]}
  selected={['hidden']}
/>
Name
Type
Description
title
string
Label for list of choices
choices*
Choice[]
Collection of choices
selected*
string[]
Collection of selected choices
name
string
Name for form input
allowMultiple
boolean
Allow merchants to select multiple options at once
titleHidden
boolean
Toggles display of the title
onChange
function(selected: string[], name: string)
Callback when the selected choices change

Purpose

Put the merchant first by identifying the problem they face and the component that helps them solve it.

Problem

Merchants need to be able to select from a set of options that are related to one another.

Solution

Grouping things together in a choice list is a way to visually present options so that merchants can decide what to select.


Best practices

Choice lists should:

  • Include a title that tells the merchant what to do or explains the available options
  • Label options clearly based on what the option will do
  • Avoid mutually exclusive options when allowing multiple selection

Content guidelines

List titles

List titles should:

  • Help merchants understand how the items in the list are grouped together, or should explain what kind of choice the merchant is making
  • Pick a shipping method

  • Pick one

  • Be concise and scannable:
    • Use simple, clear language that can be read at a glance
    • Keep list titles to a single sentence
    • It the title introduces the list, it should end with a colon
    • Should be written in sentence case
  • Shipping options

  • Shipping Options

  • Not use colons

Do

If the customer abandons their checkout, send them an email reminder to complete their order

Never

6 hours later

24 hours later

Don’t

If the customer abandons their checkout, send them an email reminder to complete their order:

Never

6 hours later

24 hours later

List choices

Every item in a choice list should:

  • Start with a capital letter

Do

  • Option 1
  • Option 2
  • Option 3

Don’t

  • option 1
  • option 2
  • option 3
  • Not use commas or semicolons at the end of each line

Do

  • Red
  • Yellow
  • Blue

Don’t

  • Red;
  • Yellow;
  • Blue.
  • Be written in sentence case (the first word capitalized, the rest lowercase)

Do

  • Item one
  • Item two
  • Item three

Don’t

  • Item One
  • Item Two
  • Item Three

Helper text and descriptions

If your list contains helper text, only the description below the list item should contain punctuation.