Skip to content
Forms

RadioGroup

Picks exactly one option from a short list.

import { RadioGroup, Radio } from "@flinbu/seed";

With descriptions

$39 per editor
2 months free
import { RadioGroup, Radio } from "@flinbu/seed";

<RadioGroup aria-label="Billing" defaultValue="monthly">
  <Radio value="monthly" label="Monthly" description="$39 per editor" />
  <Radio value="yearly" label="Yearly" description="2 months free" />
  <Radio value="later" label="Decide later" disabled />
</RadioGroup>

Horizontal

import { RadioGroup, Radio } from "@flinbu/seed";

<RadioGroup aria-label="Density" orientation="horizontal" defaultValue="default">
  <Radio value="compact" label="Compact" />
  <Radio value="default" label="Default" />
  <Radio value="comfortable" label="Comfortable" />
</RadioGroup>

Use it for

  • 2 to 5 options people should compare side by side.

Use something else for

  • Long lists: use Select.

Props

PropTypeDefaultDescription
value / defaultValuestringnoneSelected option.
onValueChange(value: string) => voidnoneCalled when the selection changes.
orientation'vertical' | 'horizontal''vertical'Layout and arrow-key direction.
invalidbooleannoneError border on every Radio.
Radio: valuestringnoneThe option's value.
Radio: label, descriptionReactNodenoneText next to the circle.

Accessibility

  • Built on Radix RadioGroup: arrow keys move and select, Tab leaves the group.
  • Give the group an aria-label or a visible label.