checkbox
gr8monk3ys/checkboxFreeComponent
checkbox (identity-styled).
Install it
npx shadcn@latest add https://ui.lscaturchio.xyz/r/checkbox.jsonSource
1"use client"23import * as React from "react"4import { CheckIcon } from "lucide-react"5import { Checkbox as CheckboxPrimitive } from "radix-ui"67import { cn } from "@/lib/utils"89function Checkbox({10 className,11 ...props12}: React.ComponentProps<typeof CheckboxPrimitive.Root>) {13 return (14 <CheckboxPrimitive.Root15 data-slot="checkbox"16 className={cn(17 "peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary",18 className19 )}20 {...props}21 >22 <CheckboxPrimitive.Indicator23 data-slot="checkbox-indicator"24 className="grid place-content-center text-current transition-none"25 >26 <CheckIcon className="size-3.5" />27 </CheckboxPrimitive.Indicator>28 </CheckboxPrimitive.Root>29 )30}3132export { Checkbox }
What it pulls in
npm packages
Files it writes
More from gr8monk3ys
All 69 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | gr8monk3ys | Components | Free | 2 deps | |
| ActiveNavLinkactive-nav-link | gr8monk3ys | Components | Free | no deps · 2 files | |
| alertalert | gr8monk3ys | Components | Free | 1 dep | |
| alert-dialogalert-dialog | gr8monk3ys | Components | Free | 1 dep | |
| aspect-ratioaspect-ratio | gr8monk3ys | Components | Free | 1 dep | |
| attachmentattachment | gr8monk3ys | Components | Free | 2 deps | |
| Avataravatar | gr8monk3ys | Components | Free | 1 dep | |
| Badgebadge | gr8monk3ys | Components | Free | 1 dep |
