A brand AI avatar leads a working-state cue: pulsing dots, a live activity line, or a reasoning disclosure that expands inline — filling the gap before the reply lands.
Loading demo: ai-thinking-indicator-real-world
npx sdaia-ui@latest add ai-thinking-indicator
import { AiThinkingIndicator } from '@/components/ui/AiThinkingIndicator';1<AiThinkingIndicator2type="reasoning"3variant="neutral"4collapsedLabel="Show reasoning"5defaultOpen6>7The user asks about Vision 2030. I should outline its purpose — economic diversification — and the three pillars, then keep the answer concise and sourced.8</AiThinkingIndicator>
A pulsing typing animation for short waits — no copy yet.
Loading demo: ai-thinking-indicator-dots
A live activity line — a sparkle plus a short status label.
Loading demo: ai-thinking-indicator-activity
A collapsed reasoning preview — a “Show reasoning” toggle that expands.
Loading demo: ai-thinking-indicator-reasoning
The expanded reasoning preview — header, divider and the reasoning body.
Loading demo: ai-thinking-indicator-reasoning-open
Prop | Type | Default | Required |
|---|---|---|---|
variant | 'neutral' | 'brand' | 'outline' | 'neutral' | optional |
style | 'neutral' | 'brand' | 'outline' | — | optional |
type | 'dots' | 'activity' | 'reasoning' | 'dots' | optional |
state | 'dots' | 'activity' | 'reasoning' | — | optional |
dir | 'ltr' | 'rtl' | — | optional |
icon | string | sparklesStroke | optional |
showAvatar | boolean | true | optional |
animated | boolean | true | optional |
label | ReactNode | — | optional |
collapsedLabel | ReactNode | 'Show reasoning' | optional |
title | ReactNode | 'Reasoning' | optional |
children | ReactNode | — | optional |
open | boolean | — | optional |
defaultOpen | boolean | false | optional |
onOpenChange | (open: boolean) => void | — | optional |
thinkingLabel | string | 'Thinking…' | optional |
labels | Partial<AiThinkingIndicatorLabels> | — | optional |
as | ElementType | 'div' | optional |
How this component behaves at the three system breakpoints. Spacing and type tokens switch automatically at 768px and 1280px.
| Screen | Behavior |
|---|---|
| Desktop (1280px and up) | The dots and activity pill are sized by their content. The reasoning panel fills its container up to 480px wide. |
| Tablet (768–1279px) | Same layout as desktop, with the tablet token values. |
| Phone (under 768px) | Same layout with the mobile token values. Activity and reasoning labels are truncated when space is short. |