Radio
Radio Group
NewA group of radios as rows with descriptions, a segmented bar with a sliding thumb, or bordered cards.
npx motionsnack add radio-groupCustomize
<RadioGroup />Props
16 properties
| Property | Type | Default | Description |
|---|---|---|---|
| options | { value: string; label: string; description?: string; disabled?: boolean }[] | Monthly / Yearly / Lifetime | The options. |
| value | string | - | Chosen value (controlled). |
| onChange | (value: string, option?: RadioGroupOption) => void | - | Called with the new value and the picked option when the visitor picks an option. |
| name | string | generated | Name of the radios, sent with a form. |
| id | string | generated | Id prefix of the radios. |
| className | string | '' | Extra classes on the fieldset. |
| variant | 'list' | 'segmented' | 'cards' | 'list' | Circles in rows, a bar with a sliding thumb, or bordered cards. |
| layout | 'vertical' | 'horizontal' | 'vertical' | Options under each other or side by side. The segmented look is always a row. |
| label | string | 'Billing' | Legend above the options. Empty hides it. |
| description | string | 'You can switch at any time.' | Line under the legend. Empty hides it. |
| defaultValue | string | 'yearly' | Value chosen at first render. Empty chooses nothing. |
| helperText | string | '' | Small text under the group. Empty hides it. |
| error | string | '' | Error message. Any text colours the unchecked circles' edge and replaces the helper text. |
| errorColor | string | '' | Overrides the per-theme error colour. Empty uses the theme pair. |
| required | boolean | false | Marks the group as required. |
| disabled | boolean | false | Disables every option. |
About Radio Group
Radio Group is for one answer out of a few: a billing period, a plan or a delivery option. It comes in three looks built on the same native radios, so arrow keys, forms and screen readers work without extra code. The list shows a circle next to each label with an optional second line; the chosen circle fills in as its dot scales up. The segmented look turns the options into one bar where a black or white thumb slides to the chosen option and inverts its text. The cards look gives every option a bordered card with the circle at the right, and the chosen card gets a full-contrast border. A legend, a description, helper text, a required mark, disabled options and an error state that turns the circles red are built in, and keyboard focus shows the library's soft outline.
What's included
- Three looks: list, segmented bar, cards
- Native radios: arrow keys, forms and screen readers
- Dot that scales in on the chosen option
- Thumb that slides to the chosen segment
- Vertical or horizontal layout
- Legend, description, helper text and error state
- Light and dark look
- Type
- Animated React radio component
- Library
- Components · Radio
- Stack
- Next.js, React, Tailwind CSS
- Added
- 2026-11-23