Rendyn

Component library

189 components

Agent UI

Todo List

Todo List renders identified task items and optional progress details.

Interactive exampleReact Tailwind CSS

Practical React example

Show the steps of an agent task with a clear current item and completed items.

Before you copy and paste

Keep the example in the React rendering environment required by the imported component. Copy components/agents/todo-list.tsx and its returned support files from the Code tab; preserve the project-relative paths.

Listed package dependencies: clsx, lucide-react, motion, react, tailwind-merge.

Use the Code tab for the component files and installation instructions, then adapt the imports in this example to your project.

Show the steps of an agent task with a clear current item and completed items

// Usage adapted from beUI's pinned MIT source.
// Copyright (c) 2026 Saurabh Chauhan. See ./LICENSES.md.
"use client";

import { RotateCcw } from "lucide-react";
import { useEffect, useRef, useState } from "react";
import {
  type TodoItem,
  TodoList,
} from "@/components/agents/todo-list";

const TASKS = [
  "Inspect the current data flow",
  "Update the response schema",
  "Add coverage for edge cases",
  "Run checks and prepare the result",
];

const TICKS_PER_TASK = 4;

function itemsAtStep(step: number): TodoItem[] {
  return TASKS.map((title, index) => ({
    id: `task-${index}`,
    title,
    status:
      step >= (index + 1) * TICKS_PER_TASK
        ? "completed"
        : step >= index * TICKS_PER_TASK
          ? "in-progress"
          : "pending",
    progress:
      step >= index * TICKS_PER_TASK &&
      step < (index + 1) * TICKS_PER_TASK
        ? ((step % TICKS_PER_TASK) + 1) * 25
        : undefined,
    detail:
      step >= index * TICKS_PER_TASK &&
      step < (index + 1) * TICKS_PER_TASK
        ? `${((step % TICKS_PER_TASK) + 1) * 25}%`
        : undefined,
  }));
}

function TodoRun() {
  const [step, setStep] = useState(0);
  const timer = useRef<number | undefined>(undefined);

  useEffect(() => {
    if (step >= TASKS.length * TICKS_PER_TASK) return;
    timer.current = window.setTimeout(() => setStep((value) => value + 1), 280);
    return () => {
      if (timer.current) window.clearTimeout(timer.current);
    };
  }, [step]);

  return <TodoList items={itemsAtStep(step)} title="Implementation plan" />;
}

export function TodoListPreview() {
  const [run, setRun] = useState(0);

  return (
    <div className="relative h-[330px] w-full max-w-lg">
      <TodoRun key={run} />
      <button
        type="button"
        onClick={() => setRun((value) => value + 1)}
        className="absolute bottom-0 left-0 inline-flex items-center gap-1.5 rounded-full px-2 py-1 text-xs font-medium text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring"
      >
        <RotateCcw className="size-3" />
        Replay
      </button>
    </div>
  );
}

Usage example adapted from beUI's pinned MIT source. Retain the source licence notices when copying.

Map the task’s event stream to stable item IDs and distinguish pending, in-progress, completed and cancelled states in the supplied data.

Customization

TodoListProps.items
Required; TodoItem[].
TodoListProps.title
Optional; ReactNode.
TodoListProps.open
Optional; boolean.
TodoListProps.defaultOpen
Optional; boolean.
TodoListProps.onOpenChange
Optional; (open: boolean) => void.
TodoListProps.collapseOnComplete
Optional; boolean.
TodoListProps.maxHeight
Optional; number.
TodoListProps.className
Optional; string.
AgentDisclosureProps.open
Required; boolean.
AgentDisclosureProps.openHeight
Optional; CSSProperties["height"].
ActionSwapButtonProps.items
Required; ActionSwapItem[].
ActionSwapButtonProps.value
Optional; string.
ActionSwapButtonProps.defaultValue
Optional; string.
ActionSwapButtonProps.onValueChange
Optional; (value: string, item: ActionSwapItem) => void.

Integration notes

  • The displayed checklist does not execute or guarantee completion of the work.
  • Keep detailed failures accessible even if the list collapses after completion.

Component source: beUI documentation . These examples describe the version imported into Rendyn. Upstream APIs may have changed; retain the source licence notices when adapting the code.

Better with your agent

Give your agent taste.

The best way to use Rendyn is through MCP. Let your agent find the right component, compare previews and bring the source into your project.

All components are free. Sign up only to connect MCP.

Connect to MCP