BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/tool-ui/plan

Plan

tool-ui/plan
FreeBlock

Display step-by-step task workflows in AI interfaces.

See it running

Open the demo on tool-ui

www.tool-ui.com/components/plan
Open
This registry sends X-Frame-Options, so its page cannot be embedded here. The link is the same page the frame would have shown.

Install it

npx shadcn@latest add https://www.tool-ui.com/r/plan.json

Source

components/tool-ui/plan/plan.tsxwww.tool-ui.com/r/plan.json · first 6 KB
1"use client";
2
3import * as React from "react";
4import { useMemo, useState, useEffect, useRef, memo } from "react";
5import { Loader2, Check, X, MoreHorizontal, ChevronRight } from "lucide-react";
6import type { PlanProps, PlanTodo, PlanTodoStatus } from "./schema";
7import {
8 cn,
9 Card,
10 CardHeader,
11 CardTitle,
12 CardDescription,
13 CardContent,
14 Accordion,
15 AccordionItem,
16 AccordionTrigger,
17 AccordionContent,
18 Collapsible,
19 CollapsibleTrigger,
20 CollapsibleContent,
21} from "./_adapter";
22import { calculatePlanProgress, shouldCelebrateProgress } from "./progress";
23
24const INITIAL_VISIBLE_TODO_COUNT = 4;
25
26const TodoIcon = memo(function TodoIcon({
27 status,
28}: {
29 status: PlanTodoStatus;
30}) {
31 if (status === "pending") {
32 return (
33 <span
34 className="border-border bg-card flex size-6 shrink-0 items-center justify-center rounded-full border motion-safe:transition-all motion-safe:duration-200"
35 aria-hidden="true"
36 />
37 );
38 }
39
40 if (status === "in_progress") {
41 return (
42 <span
43 className="border-border bg-card flex size-6 shrink-0 items-center justify-center rounded-full border shadow-[0_0_0_4px_hsl(var(--primary)/0.1)] motion-safe:transition-all motion-safe:duration-300"
44 aria-hidden="true"
45 >
46 <Loader2 className="text-primary size-5 motion-safe:animate-spin" />
47 </span>
48 );
49 }
50
51 if (status === "completed") {
52 return (
53 <span
54 className="border-primary bg-primary flex size-6 shrink-0 items-center justify-center rounded-full border shadow-sm motion-safe:animate-in motion-safe:fade-in motion-safe:zoom-in-75 motion-safe:duration-300 motion-safe:ease-out"
55 aria-hidden="true"
56 >
57 <Check
58 className="text-primary-foreground size-4 motion-safe:animate-in motion-safe:fade-in motion-safe:zoom-in-75 motion-safe:delay-75 motion-safe:duration-200 motion-safe:fill-mode-both"
59 strokeWidth={3}
60 />
61 </span>
62 );
63 }
64
65 if (status === "cancelled") {
66 return (
67 <span
68 className="border-destructive bg-destructive flex size-6 shrink-0 items-center justify-center rounded-full border shadow-sm motion-safe:animate-in motion-safe:fade-in motion-safe:zoom-in-75 motion-safe:duration-300 motion-safe:ease-out dark:border-red-600 dark:bg-red-600"
69 aria-hidden="true"
70 >
71 <X
72// … truncated

What it pulls in

npm packages

  • lucide-react
  • zod

Other registry items

  • accordion
  • card
  • collapsible

Files it writes

  • components/tool-ui/plan/_adapter.tsx
  • components/tool-ui/plan/index.tsx
  • components/tool-ui/plan/plan.tsx
  • components/tool-ui/plan/progress.ts
  • components/tool-ui/plan/README.md
  • components/tool-ui/plan/schema.ts
  • components/tool-ui/shared/contract.ts
  • components/tool-ui/shared/parse.ts
  • components/tool-ui/shared/schema.ts

Facts

Registry
tool-ui
Type
registry:block
Access
Free
Files written
9
Licence
the repository states none
First indexed
2026-08-02
Last confirmed
today

Go to the source

Docs on tool-ui www.tool-ui.com Raw registry item This item as JSON

More from tool-ui

All 27 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Approval Cardapproval-cardtool-uiBlocksFree2 deps · 11 files
Audioaudiotool-uiBlocksFree2 deps · 9 files
Chartcharttool-uiBlocksFree2 deps · 8 files
Citationcitationtool-uiBlocksFree2 deps · 15 files
Code Blockcode-blocktool-uiBlocksFree3 deps · 11 files
Code Diffcode-difftool-uiBlocksFree3 deps · 10 files
Data Tabledata-tabletool-uiBlocksFree1 dep · 17 files
Geo Mapgeo-maptool-uiBlocksFree4 deps · 12 files
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex