Cameron Kelliher

AI Chain of Thought

AI chats 110

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>
  );
}

Dependencies

More by Cameron Kelliher

View all
  • Helix Loader

    Helix Loader

    94
  • AI Streaming Text

    AI Streaming Text

    48
  • AI Tool Call

    AI Tool Call

    44
  • Signal Bars Loader

    Signal Bars Loader

    41
  • Glitch Text Loader

    Glitch Text Loader

    41
  • AI Prompt Diff

    AI Prompt Diff

    38
  • AI Conversation Tree

    AI Conversation Tree

    32
  • AI Routing Indicator

    AI Routing Indicator

    32

More in AI chats

View all
  • AI Actions

    AI Actions

    317
  • Color Picker

    Color Picker

    73
  • Prompt with Model Picker

    Prompt with Model Picker

    2
  • Agent Chat

    Agent Chat

    17
  • Approval Card

    Approval Card

    12
  • System Message

    System Message

    53
  • Message

    Message

    48
  • AI Task List

    AI Task List

    158