Checkbox

Shadcn style checkbox on Base UI with an animated check, indeterminate state, invalid and disabled styles, and an enlarged hit area for touch.

src/registry/ui/checkbox.tsx/r/checkbox.json

States

Installation#

bash
npx shadcn@latest add @minidev/checkbox

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/checkbox.json

Usage#

tsx
import { Checkbox } from "@/components/ui/checkbox"

export function Example() {
  return (
    <Checkbox id="c1" />
  )
}

API reference#

Also accepts every prop of CheckboxPrimitive.Root props, passed through to the root element.

Dependencies#

npm

@base-ui/react

Built from

No other MiniDev files

Examples#

All form components

Learn more