checkbox
yyc3-knowledge-base/checkboxUnverifiedComponent
shadcn/ui publishes no description for this item.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/YYC-Cube/YYC3-Knowledge-Base/main/YYC3-D/ui/apps/v4/checkbox.jsonSource
1"use client"23import * as React from "react"4import * as CheckboxPrimitive from "@radix-ui/react-checkbox"5import { Check } from "lucide-react"67import { cn } from "@/lib/utils"89const Checkbox = React.forwardRef<10 React.ElementRef<typeof CheckboxPrimitive.Root>,11 React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>12>(({ className, ...props }, ref) => (13 <CheckboxPrimitive.Root14 ref={ref}15 className={cn(16 "grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",17 className18 )}19 {...props}20 >21 <CheckboxPrimitive.Indicator22 className={cn("grid place-content-center text-current")}23 >24 <Check className="h-4 w-4" />25 </CheckboxPrimitive.Indicator>26 </CheckboxPrimitive.Root>27))28Checkbox.displayName = CheckboxPrimitive.Root.displayName2930export { Checkbox }
What it pulls in
npm packages
Files it writes
More from shadcn/ui
All 411 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | shadcn/ui | Components | Unverified | 1 dep | |
| alertalert | shadcn/ui | Components | Unverified | no deps | |
| alert-dialogalert-dialog | shadcn/ui | Components | Unverified | 1 dep | |
| aspect-ratioaspect-ratio | shadcn/ui | Components | Unverified | 1 dep | |
| avataravatar | shadcn/ui | Components | Unverified | 1 dep | |
| badgebadge | shadcn/ui | Components | Unverified | 1 dep | |
| breadcrumbbreadcrumb | shadcn/ui | Components | Unverified | 1 dep | |
| buttonbutton | shadcn/ui | Components | Unverified | 1 dep |
