aiellie

Search

Find a component, template or page

GitHub
Components

Typing Indicator

Three dots that bounce in turn while someone writes a reply, in a bubble that sits in a thread like a message or bare for a row of your own.

fig. 01 · open it full screen from the corner

Installation

npx shadcn@latest add "@aiellie/typing-indicator"

shadcn needs the @aiellie registry in components.json first. npx aiellie add typing-indicator adds it on its first run, then installs the same way.

Typing Indicator is three dots that bounce in turn while someone writes a reply. Use it for a person or an agent composing a message. For a model working before its first word, use Thinking Indicator, which says what it's doing.

The bubble sits in a thread like a message, in the same fill and with the same tail. The bare variant is the dots alone, for a row of your own.

Getting started

  1. Show it while they type

    Put it where their next message will land, and take it away when the message arrives.

    components/thread.tsx
    import { TypingIndicator } from "@/components/aiellie/typing-indicator"
    
    {typing ? <TypingIndicator label={`${name} is typing`} /> : null}

Anatomy

<div data-slot="typing-indicator" data-variant="bubble" role="status" aria-label="Typing">
  <span /> <span /> <span />
</div>

It's a status, so a screen reader announces label when it appears. The dots are hidden from it. Under reduced motion they hold still.

Examples

In a thread

Inside a Message, it takes the message's place beside an avatar.

Are we still on for 3?

API reference

TypingIndicator

PropTypeDefaultDescription
variant"bubble" | "bare""bubble"
labelstring"Typing"What a screen reader hears, like "Maya is typing".

All other div props are forwarded.