Task Checkbox
Overview
A todo checkbox that celebrates completion with a confetti burst and strikethrough.
This form component is intended for interfaces that need a todo checkbox that celebrates completion with a confetti burst and strikethrough, authentication flows, and settings forms. Its implementation is provided as editable source so the final behavior and styling stay inside your project.
Technologies
Detected package dependencies: framer-motion.
Today
1/4Check a task — fill, check draw, confetti and a strikethrough sweep
Installation
Usage
import { TaskCheckbox } from "@/components/spectrumui/task-checkbox"<TaskCheckbox label="Ship the changelog" onCheckedChange={(checked) => console.log(checked)} />API Reference
TaskCheckbox
Renders a row with a button exposing role="checkbox" and aria-checked; the label text toggles too. Pass checked to control it from outside, or defaultChecked to let it manage its own state.
| Prop | Type | Default | Description |
|---|---|---|---|
checked | boolean | - | Controlled checked state. Leave undefined for uncontrolled usage |
defaultChecked | boolean | false | Initial checked state when uncontrolled |
onCheckedChange | (checked: boolean) => void | - | Fires with the next checked state on every toggle |
*label | React.ReactNode | - | Task text next to the box; struck through while checked |
description | React.ReactNode | - | Optional secondary line rendered under the label |
size | "sm" | "md" | "lg" | "md" | Visual size of the row |
disabled | boolean | false | Disables pointer and keyboard interaction |
className | string | - | Additional classes merged onto the row wrapper |
Examples
Sizes
Use cases
- interfaces that need a todo checkbox that celebrates completion with a confetti burst and strikethrough
- authentication flows
- settings forms
Features
- Copy-paste source that remains in your repository
- TypeScript source included with the component
- Tailwind CSS classes editable in the component source
- Animation implemented with Motion
- Responsive Tailwind variants present in the source
- Reduced-motion handling present in the source
Accessibility
- The source includes ARIA attributes or roles; preserve them when customizing the component.
- The source checks reduced-motion preferences or includes motion-reduce styles.
- Test focus order, keyboard operation, labels, contrast, and screen-reader output in the final application context.
Customization
- Edit the Tailwind utility classes in the copied source to match your spacing, color, and typography tokens.
- Use the documented className surface for local layout adjustments, then edit the source for structural changes.
- Adjust Motion transitions in the source and keep the reduced-motion behavior aligned with the final interaction.
Related components
Topic guides
See how this component fits into broader interface patterns, implementation decisions, and working examples.
Task Checkbox FAQ
Is Task Checkbox free to use in commercial projects?
Yes. The public Task Checkbox source is available under the Apache License 2.0, including for commercial use, subject to the LICENSE terms.
How do I install Task Checkbox?
Run npx shadcn@latest add @spectrumui/task-checkbox. The page also exposes the source for manual installation.
Does Task Checkbox require Motion?
Yes. Motion usage was detected in the documented source or registry dependencies for Task Checkbox.
Does Task Checkbox use shadcn/ui or Radix UI?
No shadcn/ui or Radix UI dependency was detected in the documented Task Checkbox source.
Can I use Task Checkbox in Next.js?
The documented React source is used in this Next.js application. Keep its use client directive when copying it into the App Router. Install the detected dependencies and verify any application-specific data or image configuration.
What accessibility checks should I run for Task Checkbox?
The source includes ARIA markup, reduced-motion handling. Test the finished interface with keyboard and screen-reader workflows.