npx shadcn@latest add https://sdk-components.thesqd.com/r/ai-loading.jsonimport { AiLoading } from "@/components/blocks/ai-loading";import { AiLoading } from "@/components/blocks/ai-loading";
export function Waiting() {
return (
<AiLoading states={["Thinking", "Reading the brief", "Drafting a reply"]} />
);
}
AiLoading (role="status", centred column)
├── Inky (emotion "thinking", action "juggle" — pinned)
├── ThinkingStates (from ai-thinking-card — rotating shimmer line)
└── elapsed (useElapsed from loading-state — `showElapsed`)AiLoading
| Prop | Type | Default | Description |
|---|---|---|---|
states | readonly string[] | a generic set | Status lines to rotate through. Each trails off with an ellipsis unless it already ends in punctuation. |
stateDuration | number | 2000 | How long each state holds before the next swaps in, ms. |
emotion | InkyEmotion | "thinking" | Inky's face — any of INKY_EMOTIONS. |
action | InkyAction | "juggle" | What Inky does while it waits — a looping move. |
thought | string | — | A thought bubble over Inky, with this text in it. |
avatarSize | number | 64 | Inky's frame side, px. Keep it a multiple of 32. |
animateAvatar | boolean | true | Let Inky move. `false` freezes him. Reduced motion drops him to 2 frames a second. |
textClassName | string | Empty title size | Classes for the status line — size, weight, colour. Merged after the defaults. |
showElapsed | boolean | false | Show a live elapsed timer under the line. |
className | string | — | Merged onto the column. Any other div attribute passes through. |