Appica UIUI 1.0.0

Radio

A group of options where only one can be selected.

Usage

A Radio never stands alone — it only works inside a RadioGroup, which owns the selected value and the roving focus that lets arrow keys move between options. Each radio is identified by its value; that's what selection reports back. Wrap each radio and its text in a <label> so the text is clickable and announced together. The fill/squish animation is skipped when the user prefers reduced motion.

Examples

Default

Set the initial selection with defaultValue (uncontrolled) on the group, or drive it yourself with value + onValueChange. The group lays its options out in a column by default.

Horizontal

Pass orientation="horizontal" to lay the options out in a row. This also switches the arrow keys that move selection from ↑/↓ to ←/→.

Sizing

Radio is sized in em, so it scales with the surrounding font size — set a text-* class on the wrapping <label> and the control and text grow together. It won't shrink below a 16px floor.

Disabled

Disable the whole set with disabled on the RadioGroup, or a single option with disabled on its Radio. A disabled option is skipped by arrow-key navigation.

With descriptions

Pair each option's label with supporting text, aligning the radio to the first line. Keeping it all inside the <label> makes the whole row one target.

RTL

Every Appica UI component supports right-to-left layouts out of the box. Set the dir attribute on a container (commonly your <html> element) so CSS logical properties resolve correctly, and wrap your tree in DirectionProvider so direction-aware behavior — roving focus, popup placement, and the like — follows the same direction.

For setup details and caveats, see the RTL guide.

اختر الخطة

API reference

RadioGroup and Radio wrap Base UI's Radio. The group renders a <div role="radiogroup"> and each Radio a role="radio"; both forward ref, aria-*, and their native attributes, and expose data-* state attributes (data-checked, data-unchecked, data-disabled, data-readonly, …) for styling. See the Base UI docs for the complete API.

RadioGroup

The container that owns the selected value and keyboard navigation.

Radio

One option inside a RadioGroup.

Accessibility

  • RadioGroup renders a <div role="radiogroup"> and each Radio a role="radio". Name the group with aria-label or aria-labelledby.
  • The group is a single tab stop: Tab moves focus into the selected option (or the first one), and the arrow keys move the selection between options — ↑/↓ when vertical, ←/→ when horizontal — wrapping around the ends.
  • Each radio needs an accessible name — wrap it in a <label> together with its text, or give it an aria-label.
  • disabled on a radio or the group removes the affected options from the tab order and exposes data-disabled for styling; disabled options are skipped during arrow navigation.
  • The fill/squish animation honours prefers-reduced-motion.

© 2026 Appica UI. A free component library, crafted by the Appica team.