Radio Group
tdds/radio-groupFreeComponent
Treasury-styled radio button group
Install it
npx shadcn@latest add https://raw.githubusercontent.com/gjohnsx/ttb-label-verification/main/tdds-registry/public/r/radio-group.jsonSource
1"use client"23import * as React from "react"4import { RadioGroup as RadioGroupPrimitive } from "radix-ui"56import { cn } from "@/lib/utils"7import { CircleIcon } from "lucide-react"89function RadioGroup({10 className,11 ...props12}: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {13 return (14 <RadioGroupPrimitive.Root15 data-slot="radio-group"16 className={cn("grid gap-3 w-full", className)}17 {...props}18 />19 )20}2122function RadioGroupItem({23 className,24 ...props25}: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {26 return (27 <RadioGroupPrimitive.Item28 data-slot="radio-group-item"29 className={cn(30 "border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 flex size-4 items-center justify-center rounded-full shadow-xs focus-visible:ring-[3px] aria-invalid:ring-[3px] group/radio-group-item peer relative aspect-square shrink-0 border outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:text-primary",31 className32 )}33 {...props}34 >35 <RadioGroupPrimitive.Indicator36 data-slot="radio-group-indicator"37 className="flex items-center justify-center"38 >39 <CircleIcon className="fill-current text-current size-2.5" />40 </RadioGroupPrimitive.Indicator>41 </RadioGroupPrimitive.Item>42 )43}4445export { RadioGroup, RadioGroupItem }
What it pulls in
npm packages
Other registry items
Files it writes
More from tdds
All 43 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | tdds | Components | Free | 2 deps | |
| Alertalert | tdds | Components | Free | 1 dep | |
| Alert Dialogalert-dialog | tdds | Components | Free | 1 dep | |
| Avataravatar | tdds | Components | Free | 1 dep | |
| Badgebadge | tdds | Components | Free | 1 dep | |
| Breadcrumbbreadcrumb | tdds | Components | Free | 2 deps | |
| Buttonbutton | tdds | Components | Free | 2 deps | |
| Button Groupbutton-group | tdds | Components | Free | 1 dep |
