Radio

A control that enables people to select one option from multiple presented.

Cover

Maturity

RC

FYQ2 target

RC

Figma component

Repository

Storybook

Overview

A Radio Control is an interactive area where users can make single selections. It’s bare-bones and doesn’t include a Label or Helper text.

Anatomy

Anatomy of a Radio Control

Anatomy of a Radio Control

1- Control
2- Selected signifier

Properties

The following properties are jointly defined by design, engineering, and UX writing to speak a common language

Name

Values

Default

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 input value is required to allow users to progress

String

-

How to use

This control should always be used as part of other components, contextualizing the action user is performing by using it.

⛔️ Avoid using Radio controls without labels

⛔️ Avoid using Radio controls without labels

They should be clearly paired with labels that provide meaning to the corresponding action.

⛔️ Avoid creating selection groups

⛔️ Avoid creating selection groups

This Control is only meant to select standalone information. To select multiple items on a list, use the Selection Groups component (WIP).

⛔️ Avoid preselecting one option by default

⛔️ Avoid preselecting one option by default

Not having a default selection can prevent the submission of unintended data by requiring the user to make an active choice. This ensures that the data submitted is a result of their deliberate decision.

Behavior

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

Error variants

Error

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.

 


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.

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.