checkbox
draco-china-github/checkboxFreeComponent
shadcn/ui publishes no description for this item.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/draco-china/shadcn-pro/main/apps/docs/public/r/styles/radix-sera/checkbox.jsonSource
1"use client"23import * as React from "react"4import { Checkbox as CheckboxPrimitive } from "radix-ui"56import { cn } from "@/registry/radix-sera/lib/utils"7import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"89function Checkbox({10 className,11 ...props12}: React.ComponentProps<typeof CheckboxPrimitive.Root>) {13 return (14 <CheckboxPrimitive.Root15 data-slot="checkbox"16 className={cn(17 "peer relative flex size-4.5 shrink-0 items-center justify-center rounded-none border border-input bg-transparent transition-shadow outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary 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",18 className19 )}20 {...props}21 >22 <CheckboxPrimitive.Indicator23 data-slot="checkbox-indicator"24 className="grid place-content-center text-current transition-none [&>svg]:size-3.5"25 >26 <IconPlaceholder27 lucide="CheckIcon"28 tabler="IconCheck"29 hugeicons="Tick02Icon"30 phosphor="CheckIcon"31 remixicon="RiCheckLine"32 />33 </CheckboxPrimitive.Indicator>34 </CheckboxPrimitive.Root>35 )36}3738export { Checkbox }
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 |
