Pixelact Checkbox
pixelact-ui/checkboxFreeComponent
A simple checkbox component.
Live preview
live · rendered by the registry
Rendered by Pixelact UI on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://pixelactui.com/r/checkbox.jsonSource
1import * as React from "react";23import * as CheckboxPrimitive from "@radix-ui/react-checkbox";45import { cn } from "@/lib/utils";67import "@/components/ui/pixelact-ui/styles/styles.css";89export interface CheckboxProps10 extends React.ComponentProps<typeof CheckboxPrimitive.Root> {11 asChild?: boolean;12}1314function Checkbox({ className, ...props }: CheckboxProps) {15 return (16 // <ShadcnCheckbox17 // className={cn(18 // "rounded-none size-4 ring-0 border-none shadow-(--pixel-box-shadow) box-shadow-margin",19 // className20 // )}21 // {...props}22 // />2324 <CheckboxPrimitive.Root25 data-slot="checkbox"26 className={cn(27 "rounded-none size-4 ring-0 border-none shadow-(--pixel-box-shadow) box-shadow-margin peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-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 shrink-0 border transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",28 className29 )}30 {...props}31 >32 <CheckboxPrimitive.Indicator33 data-slot="checkbox-indicator"34 className="flex items-center justify-center text-current transition-none"35 >36 <svg37 xmlns="http://www.w3.org/2000/svg"38 width="32"39 height="32"40 viewBox="0 0 24 24"41 className="size-3.5"42 >43 <path44 className="text-foreground"45 d="M18 6h2v2h-2zm-2 4V8h2v2zm-2 2v-2h2v2zm-2 2h2v-2h-2zm-2 2h2v-2h-2zm-2 0v2h2v-2zm-2-2h2v2H6zm0 0H4v-2h2z"46 />47 </svg>48 </CheckboxPrimitive.Indicator>49 </CheckboxPrimitive.Root>50 );51}5253export { Checkbox };
Files it writes
More from Pixelact UI
All 28 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Pixelact Accordionaccordion | Pixelact UI | Components | Free | no deps · 2 files | |
| Pixelact Alertalert | Pixelact UI | Components | Free | no deps · 2 files | |
| Pixelact Alert Dialogalert-dialog | Pixelact UI | Components | Free | no deps · 2 files | |
| Pixelact Avataravatar | Pixelact UI | Components | Free | no deps · 2 files | |
| Pixelact Badgebadge | Pixelact UI | Components | Free | no deps · 2 files | |
| Pixelact Breadcrumbbreadcrumb | Pixelact UI | Components | Free | no deps · 2 files | |
| Pixelact Buttonbutton | Pixelact UI | Components | Free | no deps · 3 files | |
| Pixelact Calendarcalendar | Pixelact UI | Components | Free | no deps · 2 files |
