Forms
Radio Group
A vertical list of options where one is selected. Radio is the single item, with an animated dot.
Group: Forms. Exports: RadioGroup, Radio. shadcn/ui equivalent: Radio Group (partial parity).
Usage
import { RadioGroup } from "./halaska-kit";
RadioGroup props
optionsarray: The choices to offer.valueany: The controlled value.onChange(value) => void: Called with the new value.labelstring: Visible label.
Radio props
checkedboolean: The controlled checked state.onChange(value) => void: Called with the new value.labelstring: Visible label.disabledboolean: Prevents interaction and dims the control.tabIndexany:"aria-label"any:
Accessibility
- The group has the radiogroup role, named by a string label. Each option is a native button with the radio role and aria-checked.
- Tab reaches the selected option, or the first when none is selected. Arrow keys, Home and End move to another option and select it.
- The label text wraps the button, so clicking the text selects it too.
Known gaps
- No horizontal orientation.
- Options in a RadioGroup cannot be disabled. A single Radio can.
- No description under an option.
Used in
Halaska UI · Components · Patterns · Screens · Install