Radio Group
edgecom/radio-groupFreeComponent
The Edgecom Radio Group component.
Live preview
live · rendered by the registry
Rendered by edgecom on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://design.edgecom.ai/r/radio-group.jsonSource
1"use client"23import { Radio as RadioPrimitive } from "@base-ui/react/radio"4import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group"56import { cn } from "@/lib/utils"78function RadioGroup({ className, ...props }: RadioGroupPrimitive.Props) {9 return (10 <RadioGroupPrimitive11 data-slot="radio-group"12 className={cn("grid w-full gap-2", className)}13 {...props}14 />15 )16}1718function RadioGroupItem({ className, ...props }: RadioPrimitive.Root.Props) {19 return (20 <RadioPrimitive.Root21 data-slot="radio-group-item"22 className={cn(23 "group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",24 className25 )}26 {...props}27 >28 <RadioPrimitive.Indicator29 data-slot="radio-group-indicator"30 className="flex size-4 items-center justify-center"31 >32 <span className="absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground" />33 </RadioPrimitive.Indicator>34 </RadioPrimitive.Root>35 )36}3738export { RadioGroup, RadioGroupItem }
What it pulls in
npm packages
Other registry items
Files it writes
More from edgecom
All 66 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | edgecom | Components | Free | 2 deps | |
| Alertalert | edgecom | Components | Free | 1 dep | |
| Alert Dialogalert-dialog | edgecom | Components | Free | 1 dep | |
| Avataravatar | edgecom | Components | Free | 1 dep | |
| Badgebadge | edgecom | Components | Free | 2 deps | |
| Bannerbanner | edgecom | Components | Free | 1 dep | |
| Breadcrumbbreadcrumb | edgecom | Components | Free | 2 deps | |
| Buttonbutton | edgecom | Components | Free | 2 deps |
