checkbox
neobrutalui/checkboxFreeComponent
Let users select or deselect individual options.
Live preview
live · rendered by the registry
Rendered by neobrutalui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://www.neobrutalui.live/r/checkbox.jsonSource
1"use client"23import * as React from "react"4import { Checkbox as BaseCheckbox } from "@base-ui/react/checkbox"5import { Check } from "lucide-react"6import { cn } from "@/lib/utils"78type CheckboxProps = React.ComponentPropsWithoutRef<typeof BaseCheckbox.Root>910const Checkbox = React.forwardRef<11 React.ComponentRef<typeof BaseCheckbox.Root>,12 CheckboxProps13>(({ className, disabled, ...props }, ref) => (14 <BaseCheckbox.Root15 ref={ref}16 disabled={disabled}17 className={cn(18 "peer h-5 w-5 shrink-0 rounded-base border-2 border-black focus-brutal disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 data-checked:bg-main data-checked:text-black",19 className20 )}21 {...props}22 >23 <BaseCheckbox.Indicator24 className={cn("flex items-center justify-center text-current data-unchecked:hidden", disabled && "opacity-50")}25 >26 <Check className="h-3.5 w-3.5" strokeWidth={3} />27 </BaseCheckbox.Indicator>28 </BaseCheckbox.Root>29))30Checkbox.displayName = "Checkbox"3132export { Checkbox }
What it pulls in
npm packages
Other registry items
More from neobrutalui
All 24 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | neobrutalui | Components | Free | 2 deps | |
| alertalert | neobrutalui | Components | Free | 1 dep | |
| avataravatar | neobrutalui | Components | Free | no deps | |
| badgebadge | neobrutalui | Components | Free | 1 dep | |
| buttonbutton | neobrutalui | Components | Free | 1 dep | |
| cardcard | neobrutalui | Components | Free | no deps | |
| date-pickerdate-picker | neobrutalui | Components | Free | 2 deps | |
| dialogdialog | neobrutalui | Components | Free | 2 deps |
