Radio Group

Animated radio group with spring selection indicator, arrow key navigation, and accessible labeling.

Open in v0

Last updated: March 29, 2026

Spacing

Selected: comfortable

Installation

npx smoothui-cli add radio-group

Features

  • Animated selection indicator with spring scale animation
  • Arrow key navigation between radio options
  • Horizontal and vertical orientation support
  • Disabled state for individual items or the entire group
  • Wraps Radix UI Radio Group for robust form integration
  • Built-in label rendering with proper htmlFor association

Accessibility

Keyboard Interactions

KeyDescription
Arrow Down / Arrow RightMoves focus and selection to the next radio option
Arrow Up / Arrow LeftMoves focus and selection to the previous radio option
TabMoves focus into/out of the radio group
SpaceSelects the focused radio option (if not already selected)

ARIA Attributes

AttributeElementPurpose
role="radiogroup"RootIdentifies the container as a radio group (provided by Radix)
role="radio"ItemIdentifies each option as a radio button (provided by Radix)
aria-checkedItemIndicates whether the option is selected
aria-disabledItemIndicates disabled state

Reduced Motion

This component respects prefers-reduced-motion via useReducedMotion from Motion. When reduced motion is preferred, the selection indicator appears instantly without spring animation.

Props

RadioGroupProps

RadioProps