Radio Group

Headless radio group primitives for single-option selection.

Stable direction
@lattice-ui/radio-group

Part of the stable direction toward v1.0.

What It Is For

Use RadioGroup for mutually exclusive selection when the available options should remain visible all at once.

It is best for small, stable option sets where direct comparison matters more than compactness.

Preview size

Live demo is experimental and may contain bugs.

Install

Global CLI command: lattice add radio-group

Monorepo local script

Use your package manager wrapper when running the local lattice command.

pnpm lattice add radio-group

npm package: @lattice-ui/radio-group

Peer dependencies

  • @rbxts/react
  • @rbxts/react-roblox

Public Exports

  • RadioGroup
  • RadioGroup.Root
  • RadioGroup.Item
  • RadioGroup.Indicator
  • RadioGroupIndicator
  • RadioGroupItem
  • RadioGroupRoot

State Model

  • RadioGroup.Root manages a single selected value, optional required semantics, and horizontal or vertical orientation.
  • Items register in order so keyboard-style movement can advance through enabled choices.
  • Each item gets local checked and disabled state through context.

Key API

RadioGroup.Root

Use value, defaultValue, onValueChange, orientation, disabled, and required to define group semantics.

RadioGroup.Item

Each item needs a unique value; disabled removes it from selection without changing the rest of the group.

RadioGroup.Indicator

Use forceMount if your indicator visuals need to stay mounted across state transitions.

Composition Patterns

Settings mode selection

Use radios when the user should compare 2-5 modes directly without opening a list.

Inline option matrices

Combine group orientation and custom item visuals to produce pill, tile, or row-style selectors.

Cautions / Limits

  • Use Select instead when the option set is long enough that always-visible choices would overwhelm the layout.
  • The package is single-value by design; use Checkbox or ToggleGroup type="multiple" for multi-select behavior.

Decision Guides