theshanelevine

Thinking

AI chats 157

About

An expandable AI agent thinking trace that streams steps, reasoning, web-search results, or tool calls with a shimmering label and collapsible timeline.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Thinking to your project and fits it to your theme.

Code

How Thinking is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import ThinkingState from "@/components/ui/thinking";
import * as React from "react";

const VARIANTS = ["Steps", "Reasoning", "Search", "Coding"];

export default function ThinkingDemo() {
  const [variant, setVariant] = React.useState("Steps");
  return (
    <div className="flex w-full max-w-md flex-col items-center gap-8 rounded-2xl bg-canvas p-8">
      <div className="flex min-h-[176px] w-full items-center justify-center">
        <ThinkingState key={variant} variant={variant} />
      </div>
      <div className="flex gap-1 rounded-full bg-inset p-1">
        {VARIANTS.map((v) => (
          <button
            key={v}
            type="button"
            onClick={() => setVariant(v)}
            className={`rounded-full px-3 py-1 text-[12.5px] font-medium transition-colors ${
              variant === v
                ? "bg-surface text-ink"
                : "text-ink-2 hover:text-ink"
            }`}
          >
            {v}
          </button>
        ))}
      </div>
    </div>
  );
}

More by theshanelevine

View all
  • Loading State

    Loading State

    942
  • Streaming Text

    Streaming Text

    486
  • Records Table

    Records Table

    113
  • Approval Card

    Approval Card

    74
  • Chat Panel

    Chat Panel

    39
  • Recommendation Card

    Recommendation Card

    4
  • Filter Table

    Filter Table

    2
  • Code Block

    Code Block

    1

More in AI chats

View all
  • AI Actions

    AI Actions

    318
  • Color Picker

    Color Picker

    78
  • Agent Chat

    Agent Chat

    17
  • Approval Card

    Approval Card

    13
  • System Message

    System Message

    53
  • Prompt with Model Picker

    Prompt with Model Picker

    2
  • Message

    Message

    48
  • AI Task List

    AI Task List

    159