Skip to main content

Radio

A set of mutually exclusive options. Use RadioGroup to wrap multiple Radio components.

Basic Usage

Horizontal Layout

Variants

Disabled

RadioGroup Props

PropTypeDefaultDescription
namestring-Name attribute for all radios in this group
valuestring-Controlled selected value
defaultValuestring-Default selected value (uncontrolled)
onChange(value: string) => void-Callback when the selected value changes
variant'primary' | 'secondary''primary'Color variant
direction'horizontal' | 'vertical''vertical'Layout direction
disabledbooleanfalseWhether all radios are disabled
childrenReactNode-Radio elements
classNamestring-Additional CSS class
styleCSSProperties-Inline styles

Mobile considerations

  • The clickable area covers the label + dot so the 44px tap target is met.
  • For long option lists on mobile, consider <SegmentedControl> (2-4 options, equal width) or a Select with mobileVariant="sheet" (many options).
  • direction="horizontal" is fine on desktop but may overflow on mobile — switch to vertical with a media query or use useTouchDevice() to pick at runtime.

Radio Props

PropTypeDefaultDescription
valuestring-Value of this radio option
labelstring-Text label
requiredbooleanfalseWhether the field is required (shows red asterisk)
disabledbooleanfalseWhether the radio is disabled
classNamestring-Additional CSS class
styleCSSProperties-Inline styles