This component no longer exists. It was in neobrutal-ui’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-06 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.
Checkbox
neobrutal-ui/checkboxRemovedComponent
neobrutal-ui publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by neobrutal-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://neobrutal-ui.andongmin.com/r/checkbox.jsonSource
1"use client";23import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";4import { mergeProps } from "@base-ui/react/merge-props";5import * as React from "react";67import { cn } from "@/lib/utils";8import { CheckIcon } from "lucide-react";910type CheckedState = boolean | "indeterminate";11type CheckboxProps = Omit<12 CheckboxPrimitive.Root.Props,13 "checked" | "defaultChecked" | "onCheckedChange" | "ref"14> & {15 asChild?: boolean;16 checked?: CheckedState;17 children?: React.ReactNode;18 defaultChecked?: CheckedState;19 forceMount?: true;20 onCheckedChange?: (21 checked: CheckedState,22 eventDetails: CheckboxPrimitive.Root.ChangeEventDetails,23 ) => void;24};2526type RenderProps = React.HTMLAttributes<HTMLElement> & { ref?: React.Ref<HTMLElement> };2728function mergeRefs(...refs: (React.Ref<HTMLElement> | undefined)[]) {29 return (element: HTMLElement | null) => {30 refs.forEach((ref) => {31 if (typeof ref === "function") {32 ref(element);33 } else if (ref) {34 ref.current = element;35 }36 });37 };38}3940function preserveRadixEventCancellation(41 child: React.ReactElement<{ [key: string]: unknown; children?: React.ReactNode }>,42) {43 const eventProps: Record<string, unknown> = {};4445 for (const [name, handler] of Object.entries(child.props)) {46 if (/^on[A-Z]/.test(name) && typeof handler === "function") {47 eventProps[name] = (...args: unknown[]) => {48 (handler as (...handlerArgs: unknown[]) => void)(...args);49 const event = args[0] as50 | { defaultPrevented?: boolean; preventBaseUIHandler?: () => void }51 | undefined;52 if (event?.defaultPrevented) event.preventBaseUIHandler?.();53 };54 }55 }5657 return React.cloneElement(child, eventProps);58}5960function renderWithAliases<State>(61 render:62 | React.ReactElement63 | ((props: RenderProps, state: State) => React.ReactElement)64 | undefined,65 fallback: React.ReactElement,66 getAliases: (state: State) => Record<string, string | undefined>,67) {68 return (elementProps: RenderProps, state: State) => {69 const aliasedProps = mergeProps(70 elementProps as React.ComponentPropsWithRef<"button">,71 getAliases(state) as React.ComponentPropsWithRef<"button">,72 ) as RenderProps;7374 if (typeof render === "function") {75 return render(aliasedProps, state);76 }7778 const element = (render ?? fallback) as React.ReactElement<RenderProps>;79 const mergedProps = mergeProps(80// … truncated
What it pulls in
npm packages
