Calm motion: animations on this site only fade, with no movement
TypingIndicator
Who is typing now, under a chat
A line under a message scroller or a comment box that says who is typing a reply. Your app knows who types, for example from a Phoenix channel event, and passes the names. For a person who is online but not typing, use a badge on the avatar instead.
Basic
Eriri is typing…
namesholds the people who type now. One name, two names, and more than two each have their own sentence: "Ana and 3 others are typing…". An empty list shows nothing.- The line is a status, so a screen reader speaks a change without moving focus. The status stays in the page while it is empty, so the first name is spoken too.
- The three dots pulse, and they stop under reduced motion. They are hidden from screen readers.
- Change the words with
labelsor a label pack:one(name),two(a, b), andmany(name, more).
Usage
ts
import { BlessTypingIndicator } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
names* | string[] | — | the people who type now; empty shows nothing |
labels | Partial<{ one: (name: string) => string; two: (a: string, b: string) => string; many: (name: string, more: number) => string; }> | — |