radio-group
agentmesh/radio-groupFreeComponent
shadcn/ui publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by shadcn/ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://raw.githubusercontent.com/ombhanushaliii/agentmesh/main/example/ui/apps/v4/public/r/styles/base-vega/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 "@/registry/base-vega/lib/utils"78function RadioGroup({ className, ...props }: RadioGroupPrimitive.Props) {9 return (10 <RadioGroupPrimitive11 data-slot="radio-group"12 className={cn("grid w-full gap-3", 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 }
Files it writes
More from shadcn/ui
All 201 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | shadcn/ui | Components | Free | no deps | |
| alertalert | shadcn/ui | Components | Free | no deps | |
| alert-dialogalert-dialog | shadcn/ui | Components | Free | no deps | |
| aspect-ratioaspect-ratio | shadcn/ui | Components | Free | no deps | |
| avataravatar | shadcn/ui | Components | Free | no deps | |
| badgebadge | shadcn/ui | Components | Free | no deps | |
| breadcrumbbreadcrumb | shadcn/ui | Components | Free | no deps | |
| buttonbutton | shadcn/ui | Components | Free | no deps |
