Measured entry

shadcn-checkbox

checkboxunclassified

A client-side React checkbox delivered as a shadcn registry TypeScript component. It wraps the Radix checkbox primitive, renders a Lucide check icon, and styles state, focus, disabled, invalid, and dark-mode behavior with Tailwind utilities, theme tokens, and the shared cn helper.

Specimen
Harness screenshot of shadcn-checkbox at 375 pixels wide
Harness screenshot at 375 pixels wide. No horizontal overflow recorded.
Harness screenshot of shadcn-checkbox at 768 pixels wide
Harness screenshot at 768 pixels wide. No horizontal overflow recorded.
Harness screenshot of shadcn-checkbox at 1440 pixels wide
Harness screenshot at 1440 pixels wide. No horizontal overflow recorded.

Measured

Every value below was written by the harness on the run that produced the frames above. None of it is derived from the prose.

Harness measurements recorded for shadcn-checkbox
BuildOK
MountOK
Console errors0
Uncaught page errors0
Horizontal overflowclean at 375, 768, 1440
Axe critical0
Axe serious0
Axe moderate0
Axe minor0
Gzip marginal18.4 KB (83.0 KB build, 64.6 KB baseline)
Bare modeFAIL
Provider requiredNO
Demo usedwritten from the component source API

What the harness recorded

BARE BUILD

✗ Build failed in 1.40s
error during build:
[vite:load-fallback] Could not load <sandbox>/src/lib/utils (imported by src/cut/components/ui/checkbox.tsx): ENOENT: no such file or directory, open '<sandbox>/src/lib/utils'

Verdict

A solid fit inside an existing shadcn codebase: the wrapper is small, editable, and delegates interaction behavior to Radix. It is not drop-in for a bare React app and needs a shadcn-style setup before it will build and mount.

Use it if

  • You already use shadcn conventions and want a checkbox that fits the same theme tokens.
  • You need Radix-managed checked state, keyboard behavior, and form semantics behind a compact styled control.
  • You want the component source in your project so its states and styling remain directly editable.

Skip it if

  • Your project does not use Tailwind utilities or shadcn theme tokens and you do not want to recreate that styling layer.
  • You want a self-contained package component with no local utility alias or copied source file.
  • You already standardize on another checkbox primitive or icon library and want to avoid parallel dependencies.

Install

Installation record for shadcn-checkbox
Declared dependenciesradix-ui
Missing on installnone
Bare installfails once the shadcn-style helpers are removed, so it needs that setup
Providerno provider required in the harness

In a non-shadcn project, add Radix UI and Lucide React, provide the cn class-merging helper at the expected import alias, and configure Tailwind with the referenced color tokens, state variants, radius, shadows, focus styles, and dark-mode rules. Keep it as a client component where that distinction applies.

Source and credit

This page is a review, not a copy. The component source lives with its author and this site does not republish it. Read the license before you use anything.

Author repository

github.com/shadcn-ui/ui
License
MIT
Record published
2026-08-12

Alternatives

Other published entries for the checkbox pattern, ordered by what they measured: mounts first, then clean axe scans, then bare-mode passes, then the smaller bundle.