Skip to main content

Radio

A radio button is an interactive element that allows users to select a single option from a predefined set of choices.

Example

Illustrates the animations that happen in the radio component. In this component we have animations on hover and active states as well as when the component is selected and unselected.

Three radio button circles sat horizontally showing different stages of an animation that goes from empty to filled.

Hover

When the user hovers over an unselected radio (on:Hover), the hover state $hover01 fades in at 200ms. When a user moves the mouse away (off:Hover) the hover state $hover01 fades out at 200ms.

A chart showing timing in milliseconds for the hover-01 token.
PropertyCubic BezierEasing tokenNotes
Hover 01(.45, 0, .55, 1)$easing-functionalHover 01 opacity 0-100% at 200ms

Active

When the user clicks a radio (on:Click), the active state $active01 fades in at 100ms and then out at 100ms.

A chart showing timing in milliseconds for the active-01 token.
PropertyCubic BezierEasing tokenNotes
Active 01(.45, 0, .55, 1)$easing-functionalActive 01 opacity 0-100% at 100ms

Selected

When a radio is selected the colour fill $interactive-brand scales from the centre 0-100%. The middle scales 0-100% at a slight offset of 50ms for a transition that takes 150ms in total.

A chart showing the duration of an animation for the radio button and its fill colour when selected.
PropertyCubic BezierEasing tokenNotes
Control(.45, 0, .55, 1)$easing-functionalScales 0-100% at 100ms
Fill(.45, 0, .55, 1)$easing-functionalScales 0-100% at 100ms

Unselected

When a radio is unselected both the control and the fill scale down 100-0% at 100ms.

A chart showing the duration of an animation for the radio button and its fill colour when unselected.
PropertyCubic BezierEasing tokenNotes
Control(.45, 0, .55, 1)$easing-functionalScales 100-0% at 100ms
Fill(.45, 0, .55, 1)$easing-functionalScales 100-0% at 100ms