Thinking indicator
A live status line that shows what the agent is currently doing, rendered as a pulsing blue dot, a shimmering label, and an optional monospaced elapsed-time readout. The label re-animates in whenever its text changes.


Installed with shadcn add · 1 workaround · theme from registry.json
- installed base item https://r.assistant-ui.com/shimmer-style.json (registry preview settings)
Installation
Requires @assistant-ui in the registries of your components.json (shadcn adds official directory namespaces automatically).
Usage
import { ThinkingIndicator } from "@/components/assistant-ui/elements/thinking-indicator";export function Status() { return <ThinkingIndicator label="Thinking" />;}- Show the current step of an AI agent while it is working, such as 'Searching the web' or 'Writing code'.
- Display a running elapsed timer next to a long-running assistant task.
- Replace a generic spinner with a more descriptive status line inside a chat thread or tool panel.
- Use when the status text changes over time and a subtle animated transition on each change is desired.
Examples
Label only
Minimal indicator with just a status label and no elapsed time.
import { ThinkingIndicator } from "@/components/assistant-ui/elements/thinking-indicator";export function Basic() { return <ThinkingIndicator label="Thinking" />;}With elapsed time
Shows a formatted elapsed time on the right while the agent works.
import { ThinkingIndicator } from "@/components/assistant-ui/elements/thinking-indicator";export function Elapsed() { return <ThinkingIndicator label="Searching the web" elapsed="0:12" />;}Dynamic status from state
Updates the label as the agent moves between steps; the label re-animates on each change.
import { useEffect, useState } from "react";import { ThinkingIndicator } from "@/components/assistant-ui/elements/thinking-indicator";const steps = ["Reading files", "Planning changes", "Writing code"];export function AgentStatus() { const [index, setIndex] = useState(0); const [seconds, setSeconds] = useState(0); useEffect(() => { const id = setInterval(() => { setSeconds((s) => s + 1); setIndex((i) => (i + 1) % steps.length); }, 2000); return () => clearInterval(id); }, []); const elapsed = `${Math.floor(seconds / 60)}:${String(seconds % 60).padStart(2, "0")}`; return <ThinkingIndicator label={steps[index]} elapsed={elapsed} />;}Custom className
Adds extra classes to the root container and passes through other div attributes.
import { ThinkingIndicator } from "@/components/assistant-ui/elements/thinking-indicator";export function InlineStatus() { return ( <ThinkingIndicator label="Running tests" elapsed="0:03" className="px-3 py-2" aria-live="polite" /> );}API reference
Accessibility
- The decorative blue dot is marked aria-hidden, so screen readers only announce the label and elapsed text.
- The dot's pulse animation is disabled under prefers-reduced-motion via motion-reduce:animate-none.
- The component does not set a live region by default; to announce status changes, pass role="status" or aria-live="polite" through props.
- The label is truncated with ellipsis on overflow; ensure the container is wide enough or provide a shorter label so the full status remains readable.
- Elapsed time uses tabular numerals so the digits do not shift width as they update.
Docs written by anthropic:claude-haiku-5-5 from the registry source.
Use with Coding Agent
Paste this into Claude Code, Codex or Cursor. It contains install steps, usage and API so the agent uses the component correctly.
Use the "Thinking indicator" component (assistant-ui/elements-thinking-indicator) from its shadcn registry.1. Install it with: npx shadcn@latest add @assistant-ui/elements-thinking-indicator2. Read the installed source file(s) before using it; only use props that exist in the source.3. Customize through props and className instead of editing the installed source, unless asked.4. Available props: label, elapsed, className, ...props.Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { ThinkingIndicator } from "@/components/assistant-ui/elements/thinking-indicator";export function Status() { return <ThinkingIndicator label="Thinking" />;}```Files & dependencies
- components/assistant-ui/elements/thinking-indicator.tsx