Radio
figui/radioFreeComponent
A radio component
Live preview
live · rendered by the registry
Rendered by figui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://figui.dev/r/radio.jsonSource
1import { RadioGroup, Radio as BaseRadio } from "@base-ui/react";2import { cn } from "@/lib/utils";34function Radio({ className, ...props }: BaseRadio.Root.Props) {5 return (6 <BaseRadio.Root7 className={cn(8 "size-4 shrink-0 rounded-full border border-black-800 bg-white-1000 outline-none focus-visible:border-blue-500 data-disabled:border-grey-300 data-disabled:bg-grey-100 dark:border-white-1000 dark:bg-grey-800 dark:focus-visible:border-blue-400 dark:data-disabled:border-grey-600 dark:data-disabled:bg-grey-700",9 className,10 )}11 {...props}12 >13 <BaseRadio.Indicator className="flex h-full w-full items-center justify-center">14 <div className="size-2 rounded-full bg-black-800 dark:bg-white-1000" />15 </BaseRadio.Indicator>16 </BaseRadio.Root>17 );18}1920export { Radio, RadioGroup };
Files it writes
More from figui
All 12 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Buttonbutton | figui | Components | Free | no deps | |
| Checkboxcheckbox | figui | Components | Free | no deps | |
| Inputinput | figui | Components | Free | 2 deps · 6 files | |
| Menumenu | figui | Components | Free | 1 dep | |
| Segmented Controlsegmented-control | figui | Components | Free | 1 dep | |
| Selectselect | figui | Components | Free | no deps | |
| Separatorseparator | figui | Components | Free | no deps | |
| Sliderslider | figui | Components | Free | 2 deps |
