StacklyUI
Components/Checkbox

Checkbox

A control that toggles between checked and unchecked.

01

Preview & playground

Edit the code — the preview updates live. Try changing props, text, or classes.

playground.tsx
function Demo() {
  const [checked, setChecked] = useState(true)
  return (
    <label className="flex cursor-pointer items-center gap-3 text-sm text-fg">
      <Checkbox checked={checked} onCheckedChange={(v) => setChecked(v === true)} />
      Ship with animations
    </label>
  )
}
render(<Demo />)
02

Installation

Copy the source into your project with the registry CLI:

$pnpm dlx shadcn@latest add @stacklyui/checkbox

Or install the package and import it:

$pnpm add @stacklyui/ui motion
03

Usage

Import Checkbox from "@stacklyui/ui" and compose it as shown in the playground above. Every interactive primitive is built on Radix, so keyboard navigation, focus management, and ARIA are handled for you.