ThinkingBlock

Collapsible chain-of-thought display for AI reasoning. Shows the model's thinking process with auto-collapse on completion.

ThinkingBlock — Live Demo

Let me analyze this question... First, I need to consider the key factors involved. Looking at the available data, there are several patterns worth noting. The most relevant approach would be to compare historical trends with current metrics. Based on this analysis, I can now form a comprehensive answer.

ThinkingBlock — All States

Analyzing the request and considering multiple approaches...

Import

tsx
import { ThinkingBlock } from "@arc-lo/ui";

Basic usage

tsx
<ThinkingBlock.Root state="thinking" duration={4}>
  <ThinkingBlock.Trigger />
  <ThinkingBlock.Content>
    <p>Analyzing the request...</p>
  </ThinkingBlock.Content>
</ThinkingBlock.Root>

With streaming content

tsx
function ThinkingMessage({ thinking, state, duration }) {
  return (
    <ThinkingBlock.Root
      state={state}
      duration={duration}
      collapseOnDone
    >
      <ThinkingBlock.Trigger />
      <ThinkingBlock.Content>
        <StreamingText.Root text={thinking} speed={15}>
          <StreamingText.Content className="text-sm italic text-gray-600" />
          <StreamingText.Cursor />
        </StreamingText.Root>
      </ThinkingBlock.Content>
    </ThinkingBlock.Root>
  );
}

Parts

PartDescription
RootContainer with state management and context
TriggerClickable header with icon, label, and chevron
ContentCollapsible content area

Props

Root
PropTypeDefaultDescription
state"thinking" | "done" | "error""thinking"Current thinking state
defaultOpenbooleantrueStart expanded
collapseOnDonebooleantrueAuto-collapse when done
durationnumber | nullnullThinking duration in seconds

States

StateIconBorderBehavior
thinkingSpinnerPurple tintExpanded, content updating
doneSparkleGrayAuto-collapses after 500ms
errorX circleRed tintStays expanded