Typing indicator
Who is writing a reply, under the conversation. Three dots breathe in turn beside a sentence that names them, collapsing to "and 3 others" when a room gets busy, and a polite live region says it once instead of on every keystroke.
Copy for the hero is in the doc.
Reading it now, one sec.
When to use
- Chat, comments and support threads where a reply is on its way.
- Inside a bubble at the end of a thread, with `compact`, when names would repeat what the avatars already say.
When not to use
- An assistant generating a reply; say what it is doing with the agent status.
- Showing it for more than a few seconds after the last keystroke; stop it when typing stops.
Installation
pnpm dlx shadcn@latest add @caliper/typing-indicator
Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
TypingIndicator
2 props
Also accepts the native props of its root element and a ref.
typingLabel
0 props
No props of its own; it accepts the native props of its root element.
Keyboard
- No custom key handling; Tab and the native activation keys do the work.
Accessibility
It exposes status semantics, with aria-hidden and aria-live kept in step with state. Changes that matter are announced through a live region.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/typing-indicator.mdThe index of every part is at /llms.txt.