Simulates prefers-reduced-motion for the demo. Off follows your system setting.
Steps focus through the demo with ] and [. Tab, arrows, and Escape stay native so the component behaves as shipped.
1
A list of options where the pick glides from one to the next.
npx shadcn@latest add ikislay/pixel-ui/radio-groupimport { RadioGroup } from "@/components/ui/radio-group"export function Demo() {return (<RadioGrouparia-label="Plan"defaultValue="monthly"options={[{ value: "monthly", label: "Monthly" },{ value: "yearly", label: "Yearly", description: "Two months free" },]}/>)}
1// Loading…
Options you can pass to customize this component.
options*{ value: string; label: ReactNode; description?: ReactNode; disabled?: boolean }[]The choices, in order. A description shows under its label.
valuestringControls the picked option. Leave it unset to let the group manage itself.
defaultValuestringThe starting pick when uncontrolled. Nothing is picked by default.
onValueChange(value: string) => voidCalled with the newly picked value.
onFeedback(event: "select") => voidCalled at each semantic moment, for wiring sound or haptics.
classNamestringMerged onto the root element.