Playground

Selection

Unchecked, checked, and error.

Label & supportive text

The control can stand alone, carry a label, add supportive helper text, and mark a required field with an asterisk.

Disabled

Disabled radios use muted fills and content, with a not-allowed cursor.

When to Use

Best for

  • Choosing exactly one option from a short, mutually exclusive set
  • Settings where all options should stay visible at once (shipping method, plan)
  • Groups of 2–5 options — above that, a select or dropdown scales better

Consider alternatives when

  • More than one option can be selected — use a Checkbox
  • Toggling a single on/off setting — use a switch or toggle
  • Many options in limited space — use a select or dropdown

Props

PropTypeRequiredDescription
checkedbooleanNoSelected state (controlled). Pair with onChange
defaultCheckedbooleanNoInitial selected state (uncontrolled, default: false)
errorbooleanNoError state — critical fill, red border, critical helper text (default: false)
labelstringNoLabel text. When omitted, only the control renders
supportiveTextstringNoHelper text under the label
requiredbooleanNoShow a required asterisk after the label (default: false)
isDisabledbooleanNoDisable interaction (default: false)
onChange(checked: boolean) => voidNoFires when this radio becomes selected
namestringNoRadio group name — radios sharing a name are mutually exclusive
valuestringNoValue submitted with the form when selected
idstringNoElement id (autogenerated when omitted)

Import

import { Radiobutton } from '@/components/Radiobutton/eshop';

Wrap the radio (or any ancestor) in <div data-platform="eshop"> so the eShop typography classes apply. Give grouped radios the same name so only one can be selected.

Design Tokens

PurposeToken
Control fill (unchecked)var(--color-fill-element-field)
Control border (unchecked)var(--color-border-element-field)
Control fill (checked)var(--color-fill-element-field-selected)
Control fill (error)var(--color-fill-element-critical-soft)
Control border (error)var(--color-border-element-field-error)
Control fill (checked disabled)var(--color-fill-element-bold-disabled)
Inner dotvar(--color-content-primary-inverse)
Label textvar(--color-content-primary)
Supportive textvar(--color-content-secondary)
Error / required textvar(--color-content-critical)
Disabled contentvar(--color-content-disabled)
Focus ringvar(--color-border-element-focus-ring)
Control radiusvar(--primitive-radius-full)
Typography (label).body-md / .body-sm (scoped to [data-platform="eshop"])

Related Components

Page tokens