sheengemologic ui
All components

RadioGroup

A named native group of mutually exclusive choices.@gemologic/sheen · forms

Playground

Refresh cadence
<RadioGroup label="Refresh cadence" name="cadence" options={[{ value: "live", label: "Live" }, { value: "manual", label: "Manual" }]} defaultValue="live"  orientation="vertical"/>

Variant matrix

Refresh cadence
Refresh cadence
orientation: vertical
Refresh cadence
orientation: horizontal
Refresh cadence

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 keys

Do

  • 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

NameTypeDefaultDescription
idstringRoot fieldset ID used to derive stable nested IDs.
refHTMLFieldSetElement | ((element: HTMLFieldSetElement) => void)Native root fieldset reference.
name *stringRequired nonempty native name; use a distinct name per group within its owning form.
label *stringRequired visible group legend.
options *readonly CheckboxOption[]Options with unique nonempty values, labels, optional descriptions and disabled flags.
valuestring | nullApp-owned selection; null explicitly selects nothing.
defaultValuestring | nullCaptured uncontrolled selection restored on uncanceled form reset.
onValueChange(value: string | null) => voidReceives requested selection changes, including null when reset clears an uncontrolled group.
descriptionstringSupporting instructions associated with the group and its inputs.
errorstringAssociated group error and invalid state without automatic focus or announcements.
readOnlybooleanfalseRejects changes while retaining focus and submitted values.
requiredbooleanfalseRequires one selection for native form validation.
orientation"horizontal" | "vertical"verticalVisual arrangement and ARIA orientation.
Native Solid/HTML attributes remain available and are omitted from this authored-prop view.