Checkbox
tdds/checkboxFreeComponent
Treasury-styled checkbox
Install it
npx shadcn@latest add https://raw.githubusercontent.com/gjohnsx/ttb-label-verification/main/tdds-registry/public/r/checkbox.jsonSource
1"use client"23import * as React from "react"4import { Checkbox as CheckboxPrimitive } from "radix-ui"56import { cn } from "@/lib/utils"7import { CheckIcon } from "lucide-react"89function Checkbox({10 className,11 ...props12}: React.ComponentProps<typeof CheckboxPrimitive.Root>) {13 return (14 <CheckboxPrimitive.Root15 data-slot="checkbox"16 className={cn(17 "border-input data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:text-primary-foreground 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-[4px] border shadow-xs outline-none focus-visible:ring-[3px] aria-invalid:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-muted disabled:border-muted peer relative shrink-0 after:absolute after:-inset-x-3 after:-inset-y-2",18 className19 )}20 {...props}21 >22 <CheckboxPrimitive.Indicator23 data-slot="checkbox-indicator"24 className="flex items-center justify-center text-current"25 >26 <CheckIcon className="size-3.5" strokeWidth={3} />27 </CheckboxPrimitive.Indicator>28 </CheckboxPrimitive.Root>29 )30}3132export { Checkbox }
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 |
