npx shadcn@latest add https://sdk-components.thesqd.com/r/loading-overlay.jsonimport { LoadingOverlay } from "@/components/blocks/loading-overlay";import { LoadingOverlay } from "@/components/blocks/loading-overlay";
export function Page({ data }) {
return (
<>
<LoadingOverlay
loading={!data}
states={["Fetching the project", "Gathering the files", "Almost there"]}
/>
{data && <Content data={data} />}
</>
);
}
LoadingOverlay (role="status", fixed or `contained` blur, fades on `loading={false}`)
├── Inky (stageWidth "fill", scene, action "walkaway" — `inky` overrides)
├── ThinkingStates (from ai-thinking-card — rotating shimmer line)
└── elapsed (useElapsed from loading-state — `showElapsed`)LoadingOverlay
| Prop | Type | Default | Description |
|---|---|---|---|
loading | boolean | true | Show the overlay. `false` fades it out over 400ms. |
contained | boolean | false | Cover the nearest `relative` parent (absolute, z-10) instead of the viewport (fixed, z-100). |
states | readonly string[] | a generic set | Status lines to rotate through. |
stateDuration | number | 2000 | How long each state holds before the next swaps in, ms. |
emotion | InkyEmotion | — | Inky's face. Unset, he is free — seasonal outfit and easter eggs. |
action | InkyAction | "walkaway" | What Inky does while it waits. |
thought | string | — | A thought bubble over Inky, with this text in it. |
avatarSize | number | 96 | Inky's frame side, px. Keep it a multiple of 32. |
scene | boolean | true | Draw the sea behind Inky. |
inky | Partial<InkyProps> | — | Any other Inky prop — skin, costume, person, vehicle, backdrop, stageWidth. Spread last, so it wins. |
textClassName | string | Empty title size | Classes for the status line — size, weight, colour. |
showElapsed | boolean | false | Show a live elapsed timer under the line. |
className | string | — | Merged onto the overlay. Any other div attribute passes through. |