Checkbox
FormsCaptures an independent checked, unchecked, or indeterminate choice.
Try it
Add to your project
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/checkbox.jsonThe 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:
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.jsonUsing 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
| Prop | Type | Required |
|---|---|---|
shape | SelectorShape | No |
tone | SelectorTone | No |
size | SelectorSize | No |
indicator | SelectorIndicator | No |
showIndicator | boolean | No |
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
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.