Skip to content
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…
  • names holds 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 labels or a label pack: one(name), two(a, b), and many(name, more).

Usage ​

ts
import { BlessTypingIndicator } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
names*string[]—the people who type now; empty shows nothing
labelsPartial<{ one: (name: string) => string; two: (a: string, b: string) => string; many: (name: string, more: number) => string; }>—

Released under the MIT License. Character names and artwork belong to their owners.