Checkbox

Square boolean control. Controlled or uncontrolled. Inline label, accent fill on checked, an accent focus ring, a press scale, a pop-in on the checkmark, and a 40px touch target on coarse pointers.

States

Add to your project

One command adds this component to your project.

1

Run the following command. New project? Run npx shadcn@latest init first to set up Tailwind and path aliases.

npx shadcn@latest add @aicanvas/andromeda-checkbox

Props

Every prop this component accepts. Any other prop is forwarded to the underlying element.

PropTypeDefaultDescription
checkedboolean-Controlled checked state.
defaultCheckedbooleanfalseUncontrolled initial state.
onCheckedChange(next: boolean) => void-Handler called with the next checked state when toggled.
labelstring-Optional inline label.
disabledbooleanfalseDisables the checkbox and blocks interaction.
classNamestring-Extra classes merged onto the visual box.
styleReact.CSSProperties-Inline styles applied to the outer wrapper.
idstring-Id applied to the input and inline label, auto-generated if omitted.

More Andromeda components