A single-select radio group as quiet rows or selectable cards, with a marker that glides. For picking one of a few.
RadioGroup playground
Install RadioGroup
1. New project? One command installs the package and wires everything - see Installation:
pnpm dlx zyncat-ui init2. Import the component - it loads its own stylesheet:
import { RadioGroup } from '@zyncat/ui/radio-group';Usage
import { RadioGroup } from '@zyncat/ui/radio-group'; <RadioGroup name="plan" label="Select a plan" value={plan} onChange={setPlan} options={PLAN_OPTIONS} />Compose RadioGroup in your application. No Tailwind or external styling library is required; every value resolves from Zyncat UI's token vocabulary.
RadioGroup props
RadioGroup
RadioOption
Frequently asked questions
Set variant to 'rows' (the default, a quiet stacked list) or 'cards' (bordered, selectable tiles). orientation then lays either one out 'vertical' (default) or 'horizontal', and an option's icon only renders in the cards variant.
It's one shared dot with a layout id, so picking a different option glides the marker across to it instead of it popping in and out; the 'cards' variant animates its selected-tile fill the same way.
Pass error as the message itself, not a boolean - <RadioGroup error="Pick a plan to continue." ... /> recolors the unselected dots to the danger token and reveals your message under the options through a Collapse.
Yes, natively - every option is a real <input type="radio"> sharing one name, inside a <fieldset>/<legend>, so the browser's own arrow-key roving and Tab behavior apply with no custom key handling in the component.