Loading
What shows while an agent works: a live mark, a shimmering label and the time so far.
Installation
npm i @uisatin/uiimport { AgentLoading } from '@uisatin/ui/agent-loading'About 14.1 kB of JavaScript, minified and gzipped, with what it imports (React aside). The stylesheet is one file for every component.
npx shadcn@latest add https://uisatin.dev/r/agent-loading.jsonAdds agent-loading.tsx and labels.tsx to components/ui.
First time with Satin? Set it up once, styles and fonts included, with the installation guide.
API Reference
The AgentLoading component is a status region: screen readers hear the label as it changes. Once the agent is done, render Thinking in its place.
| Prop | Type | Default |
|---|---|---|
indicator | "tetris""flappy" | "tetris" |
glimmer | "color""neutral" | "color" |
label | string | "Thinking…" |
time | string | — |
className | string | — |
ref | Ref<HTMLDivElement> | — |
...props | ComponentProps<'div'>Other attributes go to <div> | — |
Accessibility
A role="status" region with aria-live="polite": screen readers read the label ("Thinking…") and read it again when it changes. time is hidden from screen readers, so a clock that ticks every second stays quiet. Mount the component before the work starts, or it may not be announced: a live region filled at the moment it appears is the one screen readers miss most. The tetris mark and the bird are hidden, and under reduced motion they stop moving.
Something wrong or missing on this page?
Report a problemSuggest an improvement