RadioGroup
A named native group of mutually exclusive choices.@gemologic/sheen · formsPlayground
<RadioGroup label="Refresh cadence" name="cadence" options={[{ value: "live", label: "Live" }, { value: "manual", label: "Manual" }]} defaultValue="live" orientation="vertical"/>Variant matrix
Refresh cadence
orientation: vertical
orientation: horizontal
Anatomy
- Package
@gemologic/sheen- Source
packages/ui/src/primitives/RadioGroup.tsx- Tokens
--sheen-color-border-control--sheen-color-accent--sheen-color-focus-ring--sheen-icon-size-md
Accessibility
Role: radiogroupKeyboard: Tab, Shift+Tab, Space, Arrow keysDo
- Use a stable legend and unique native group name.
Do not
- Do not use radios for independent on/off choices or toolbar toggle groups.
Generated props
| Name | Type | Default | Description |
|---|---|---|---|
id | string | — | Root fieldset ID used to derive stable nested IDs. |
ref | HTMLFieldSetElement | ((element: HTMLFieldSetElement) => void) | — | Native root fieldset reference. |
name * | string | — | Required nonempty native name; use a distinct name per group within its owning form. |
label * | string | — | Required visible group legend. |
options * | readonly CheckboxOption[] | — | Options with unique nonempty values, labels, optional descriptions and disabled flags. |
value | string | null | — | App-owned selection; null explicitly selects nothing. |
defaultValue | string | null | — | Captured uncontrolled selection restored on uncanceled form reset. |
onValueChange | (value: string | null) => void | — | Receives requested selection changes, including null when reset clears an uncontrolled group. |
description | string | — | Supporting instructions associated with the group and its inputs. |
error | string | — | Associated group error and invalid state without automatic focus or announcements. |
readOnly | boolean | false | Rejects changes while retaining focus and submitted values. |
required | boolean | false | Requires one selection for native form validation. |
orientation | "horizontal" | "vertical" | vertical | Visual arrangement and ARIA orientation. |