A todo-style checkbox with animated strikethrough effect when checked.
Install
Add it to your project
Run this in a project set up for shadcn/ui. It writes the files and installs the npm packages.
First time: connect the Infinity UI registry
- Create a personal token on your Tokens page.
- Put it in
.env.localasINFINITYUI_TOKEN. - Add the registry to
components.json:
{
"registries": {
"@infinityui": {
"url": "https://infinityui.io/r/{name}.json",
"headers": {
"Authorization": "Bearer ${INFINITYUI_TOKEN}"
}
}
}
}Using Claude Code, Codex, Cursor, Lovable or v0? See CLI & MCP for a setup prompt.
npm packages it adds
- motion
Code
"use client";
import * as React from "react";
import { CheckboxTodo } from "@/registry/ruixenui/checkbox-todo";
export default function CheckboxTodoDemo() {
const [tasks, setTasks] = React.useState([
{ id: "1", label: "Review pull requests", done: false },
{ id: "2", label: "Update documentation", done: true },
{ id: "3", label: "Fix navigation bug", done: false },
{ id: "4", label: "Deploy to production", done: false },
]);
const toggleTask = (id: string, done: boolean) => {
setTasks((prev) =>
prev.map((task) => (task.id === id ? { ...task, done } : task)),
);
};
return (
<div className="flex min-h-[350px] w-full items-center justify-center">
<div className="flex flex-col gap-1">
{tasks.map((task) => (
<CheckboxTodo
key={task.id}
label={task.label}
checked={task.done}
onCheckedChange={(done) => toggleTask(task.id, done)}
/>
))}
</div>
</div>
);
}
































