Choices

A selection tool to make clear, concise choices from a list of options.

Cover

Overview

Types

🎖️ Choices Field — preferred

Maturity

RC

FYQ2 target

Beta

Figma component

Repository

Storybook

The Choices Field is a Field composition that wraps a Choices Control. This is the preferred component as it has all the elements needed to make the control usable and accessible.

⚠️ Choices Control — use with caution

Maturity

RC

FYQ2 target

Beta

Figma component

Repository

Storybook

The Choices Control is bare-bones and doesn’t include a Label or Helper Text. It is composed of a set of Choice Item controls.


Anatomy

Choice Item Control

The Choice Item control is composed of a Checkbox/Radio Control and a Value Label.

Anatomy of a Choice Item Control

Anatomy of a Choice Item Control

1. Checkbox Control
2. Value Label
3. Description
4. Radio control

Properties

Name

Values

Default

Value Label
Provides meaning to the control

String

-

Disabled

Disables all interactions

boolean

False

ReadOnly

Disables interaction and focus and signifies it

boolean

False

Empty
Represents the default state of a control

boolean

True

Error

Signifies that choice item selection is required to allow users to progress

String

-

Type
Controls if the multiple or single selection is available

single-select | multi-select

single-select

Description
Provides additional meaning to the Value Label

boolean

False

Choices Control

A Choices Control is composed of two or more Choice Item Controls.

Anatomy of a Choices Control

Anatomy of a Choices Control

1. Choice Item Control
2. Group heading
3. Error Signifier
4. Error Text

Properties

Name

Values

Default

Error
Signifies that choice interaction is required to allow users to progress

String

-

Group heading
Controls if the Choice Items display grouped

Boolean

False

Orientation
Controls the orientation of the list of choice items

Vertical | Horizontal

Vertical


How to use

Preselecting content

Whether or not to preselect options in the Choices Control can assist users in making the most appropriate choice for their particular context.

⛔️ Avoid preselecting choices that may bias or mislead users

⛔️ Avoid preselecting choices that may bias or mislead users

If preselected options can unfairly influence user decisions, it is important to avoid such bias.

✅ Use preselection to enhance user experience when appropriate

✅ Use preselection to enhance user experience when appropriate

With equally important choices, preselecting the first option can prevent odd empty states.

✅  Consider preselection when that fits our recommendation

✅  Consider preselection when that fits our recommendation

Leverage our knowledge to recommend specific choices over others when appropriate

Value Labels and Descriptions

Value Labels describe choices; descriptions provide detailed meaning. While Value Labels are mandatory, Descriptions are optional and must be used sparingly.

Value Label

⛔️ Avoid long, complicated sentences

⛔️ Avoid long, complicated sentences

Lengthy sentences in choices decrease readability and increase complexity

✅ Be concise, direct, and consistent

✅ Be concise, direct, and consistent

The label mirrors the value. Provide only essential information; use descriptions for further clarification

Description

⛔️ Only add descriptions when needed

⛔️ Only add descriptions when needed

Don't use descriptions for Choice items unless necessary

✅ Explain value labels clearly

✅ Explain value labels clearly

Use descriptions where they add value in helping users make a choice

Related content

Single-select vs. Multi-select

Choices inherit their functionality from Checkboxes and Radios. To enable the selection of multiple items from a list, we use the Multi-select option. Similarly, we would use the Single-select option if we only want to allow users to select a single item from the list.

✅ Consider using Single-select for mutually exclusive options

✅ Consider using Single-select for mutually exclusive options

✅ Consider using Multi-select for making multiple selections simultaneously

✅ Consider using Multi-select for making multiple selections simultaneously

Disabled and ReadOnly

The Disabled and ReadOnly attributes have been consistently applied across all selectable items in this context, ensuring uniformity in their usage

⛔️ Avoid inconsistent usage of ReadOnly states on the Choices control

⛔️ Avoid inconsistent usage of ReadOnly states on the Choices control

Inconsistent usage of the ReadOnly state on the Choices control can lead to confusion and errors in data entry.

⛔️ Avoid inconsistent usage of disabled state on choices control

⛔️ Avoid inconsistent usage of disabled state on choices control

All items should hold the disabled state if any item holds it.

Number of choices

The number of choices in the Choice Field is restricted to a range of two to six options. This limitation ensures that any text or error messages are displayed in close proximity to their respective labels, making the selection process more intuitive.

⛔️ Avoid just one item Choices control

⛔️ Avoid just one item Choices control

Use Checkbox Field in case you want users to select standalone content or confirm something specific

✅ Consider using a Combobox or Select controls for long choices lists

✅ Consider using a Combobox or Select controls for long choices lists

That will reduce visual clutter on the screen, enhance usability and keep helper and error messages more contextually relevant

Orientation

The Choices Control offers flexibility in displaying options, adapting to Vertical (default) and Horizontal orientations based on use cases. The Vertical orientation is preferred for scalability, content variety, and viewport sizes.

⛔️ Avoid horizontal display in narrow containers

⛔️ Avoid horizontal display in narrow containers

Remember that the container width may vary based on the viewport

✅ Use horizontal orientation for limited number of choices and low character number Value Labels

✅ Use horizontal orientation for limited number of choices and low character number Value Labels

A single word or a very short couple of them should be enough

✅ Opt for vertical orientation in narrow containers for multiple choice Items

✅ Opt for vertical orientation in narrow containers for multiple choice Items

The most scalable way to display choices is vertical

Sizing and Spacing

We use standard sizing and spacing for all interactive controls to improve the experience depending on the information density and make our interface more accessible, predictable, and easy to use.

Related content

Full-width

FullWidth - vertical

The Vertical Choices Control is designed to adjust its width to fit within its parent container while accounting for any padding. Once it reaches the maximum width allowed by the container, the Value Label will automatically wrap to the next line, causing the height of the container to increase as needed.

FullWidth - horizontal

The Horizontal Choices Control is designed to keep always in one line, in a way that Choice Items never stack. The Value label gets truncated depending on the available space in the container.

Min-width

min width

The Choices Control is set to have a minimum width of 120px. Suppose the container's width exceeds this limit and the Value Label extends beyond the available space. In that case, the label will be truncated, losing any text that extends beyond the limit.


Behavior

Choice Item Control States

The state of a component can depend on properties set before people can interact with it. We call them state properties. Differentiating them from the user-triggered states allows us to combine them, creating richer states that cover the whole interaction spectrum.

Related content

Default variants

Default - item

Error variants

Error - item

ReadOnly variant

readOnly

When the property ReadOnly is True, people can’t edit the control. ReadOnly displays values in an accessible way so that users can read them. ReadOnly control can be focused and hovered but can’t be interacted with.

Disabled variant

Disabled

When the property Disabled is True, users can't edit the control. A Disabled control cannot be focused or hovered.

Choices Control states

The state of a component can depend on properties set before people can interact with it. We call them state properties. Differentiating them from the user-triggered states allows us to combine them, creating richer states that cover the whole interaction spectrum.

Related content

Default variants

Default - choices

Error variants

Error - choices

 


Quality checklist

This component passes the following requirements described in our Component lifecycle.

Maturity

RC

α · Design tokens

It uses Ariane design tokens.

α · Official assets

It uses the official Ariane assets (e.g., icons and illustrations) in one of the official sizes.

α · Accessible use of color

Its color contrast ratio is at least 4.5:1 for text and interactive areas.

α · Target areas

Its interactive target areas are large enough for users to accurately select them, following the Fitts law.

α · Naming agreement

Its name is agreed upon and shared between design and development.

α · Responsive L1

Is responsive to different viewport sizes.

α · User-triggered states

If the component is interactive, all its possible user-triggered interactive states are defined.

β · Responsive L2

The responsive behavior has been reviewed and validated by the team.

β · State properties

All the possible state attributes are defined.

β · Docs L1

It has essential documentation with at least primary usage.

β · Use cases

All the uses are audited and refined.

RC · Definition agreement

Its naming and properties are audited and aligned in design and code.

RC · Accessible L1

Its accessibility is manually audited, and any significant issues are fixed.

RC · Docs L2

The documentation covers the most common use cases and is expected to be iterated during the Release Candidate phase.

RC · Storybook

Includes a Storybook playground of the component.

Stable · Stable API

The component and its API remain stable, with no breaking changes for at least one month.

Stable · Adaptive

Supports adaptive design via preference queries.

Stable · Docs L3

Detailed documentation exists for design, content, accessibility, and implementation, including do’s and dont’s.

Stable · Tooling

Tooling (such as linters, codemods, etc.) exists to help with migrations and prevent further use of alternatives.