About
Collapsible component that visualizes AI reasoning as step-by-step thinking with status indicators, search results, and images.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds AI Chain of Thought to your project and fits it to your theme.
Code
How AI Chain of Thought is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import {
AiChainOfThought,
AiChainOfThoughtHeader,
AiChainOfThoughtContent,
AiChainOfThoughtStep,
AiChainOfThoughtSearchResults,
} from "@/components/ui/chain-of-thought";
export default function ChainOfThoughtDemo() {
return (
<div className="mx-auto w-full max-w-lg p-4">
<AiChainOfThought>
<AiChainOfThoughtHeader stepCount={3} completedCount={2} />
<AiChainOfThoughtContent>
<AiChainOfThoughtStep
status="complete"
title="Understanding the question"
description="Parsed user intent and extracted key entities"
/>
<AiChainOfThoughtStep
status="complete"
title="Searching for information"
>
<AiChainOfThoughtSearchResults
results={[
{
title: "React Docs",
url: "https://react.dev",
snippet: "The library for web and native user interfaces.",
},
{
title: "Next.js Documentation",
url: "https://nextjs.org/docs",
snippet: "The React framework for the web.",
},
]}
/>
</AiChainOfThoughtStep>
<AiChainOfThoughtStep status="active" title="Formulating response" />
</AiChainOfThoughtContent>
</AiChainOfThought>
</div>
);
}
















