TypingIndicator
StableThree pulsing dots that show the assistant is getting ready to reply.
Also known as typing dots, is typing, loading dots
Install with npm install @tattva/ui (setup), or copy the code from the kit in Downloads.
Default
<TypingIndicator />The default label is "Assistant is thinking".
When to use it
Three pulsing dots in the spot where the reply will appear. They fill the gap between sending a message and the first words, so people know the assistant heard them.
Use it for
- The moment after a message is sent, until the first words arrive.
- Beside the assistant's avatar, where the reply will start.
Not for
- A step you can name, like searching the web: use ShimmerText.
- Loading that is not the assistant replying: use Spinner.
- A reply that has started to appear: use Message.
Do and avoid
When does my flight land?
Assistant: Your flight lands at 9:40. The hotel lets you check in from 2 pm.
Do
- Show it only until the first words appear.
- Put it in the same spot where the reply will appear.
- Change the label when the assistant is doing something specific.
- Use ShimmerText beside it when you can name the step, like a search.
Avoid
- Do not keep it on screen once the reply starts appearing.
- Do not use it for loading that is not the assistant. Use Spinner or Skeleton.
- Do not show several in the same conversation.
- Do not make the dots lime or amber.
On a phone
- TypingIndicator is three small dots and looks the same on a phone.
- It is not tappable. Put it in the message list where the next reply will start, so it does not push content when the reply arrives.
Properties
| Prop | Type | Default | Description |
|---|---|---|---|
| label | string | "Assistant is thinking" | Accessible name announced for the status. |
"Show code under the preview gives the code for the example on the stage."
Tokens
Change one of these and every part that uses it follows.
--fg-subtle--animate-pulse-dot
Built in
- It is marked as a status and named by its label, "Assistant is thinking" by default.
- The dots have no text, so screen readers get only the label.
- The dots stop pulsing for people who turn off motion in their system settings.
What you need to do
- Change the label when the assistant is doing something specific.
Built toward WCAG 2.2 AA and checked automatically; no independent audit yet. Read the accessibility guide