Command Palette

Search for a command to run...

Docs
Checkbox Todo

Checkbox Todo

A todo-style checkbox with animated strikethrough effect when checked.

Installation

Usage

import { useState } from "react";
import CheckboxTodo from "@/components/ruixen/checkbox-todo";
 
export default function MyComponent() {
  const [done, setDone] = useState(false);
 
  return (
    <CheckboxTodo
      label="Complete this task"
      checked={done}
      onCheckedChange={setDone}
    />
  );
}

Props

PropTypeDefaultDescription
checkedboolean-Controlled checked state
defaultCheckedbooleanfalseDefault checked state
onCheckedChange(checked: boolean) => void-Callback when state changes
labelstring-Task label (required)
animatedbooleantrueEnable strikethrough animation
disabledbooleanfalseDisable the checkbox
classNamestring-Additional CSS classes

Features

  • Animated strikethrough effect
  • Round checkbox design for todo style
  • Smooth transitions
  • Green checkmark on completion
  • Light and dark mode support