Skip to content
Cojeev UI

Checkbox

Forms

Captures an independent checked, unchecked, or indeterminate choice.

React · copy into your project · light and dark themes

Try it

Loading preview…

Take it with you

Copy the example, API and usage notes for your editor or AI assistant.

Add to your project

Terminal
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/checkbox.json

The command includes the component’s shared dependencies. Your project keeps editable source files.

Include the complete example

This example also composes select, label, typography. Install its parts together:

Terminal
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/checkbox.json https://luv-jeri.github.io/cojeev-ui/r/select.json https://luv-jeri.github.io/cojeev-ui/r/label.json https://luv-jeri.github.io/cojeev-ui/r/typography.json

Using checkbox

  • The default organic selector stays close to a circle, with subtle asymmetry and cursor-responsive contour motion.

  • Choose organic, circle, rounded, pebble, leaf or flower; pink, blue, olive and yellow tones are available.

  • Use checked and onCheckedChange for controlled state or defaultChecked for a local default.

  • Group related options when users may choose more than one, and use indeterminate for a partially selected collection.

  • Use size="sm" | "default" | "lg" or a numeric16–64px size. indicator chooses auto/dot/check/diamond/flower; showIndicator={false} leaves the selected outer blob only.

API

Compose the exported parts below. The prop types are read from the React source during the registry build.

Native element or underlying primitive props are inherited where declared, including accessible labels, event handlers and refs.

CheckboxProps

PropTypeRequired
shapeSelectorShapeNo
toneSelectorToneNo
sizeSelectorSizeNo
indicatorSelectorIndicatorNo
showIndicatorbooleanNo

CheckboxGroupProps

Accepts the native or primitive props declared by its exported TypeScript type.

CheckboxBodyProps

Accepts the native or primitive props declared by its exported TypeScript type.

Accessibility

  • Associate each checkbox with a visible label and give a group a shared description when the choices need context.

States and appearance

uncheckedcheckedfocuseddisabledreduced-motion

For conditional content, keep a MotionPresence boundary around keyed MotionSurface children. The shared entrance and exit states work with native primitives and respect your motion preference.

Try pointer and keyboard interaction, and switch the appearance control in the navigation to compare light and dark mode. Motion respects reduced motion preferences.