Skip to content

NewMCP server for your coding agent. Set it up ›

Nexus UI
Get Pro

Typing Indicator, animated React component

A free React typing indicator for chat. Three liquid dots ride a wave inside a bubble, then fold away and the same bubble opens into the message, word by word. Names under the bubble say who is typing, avatars stack when several people are, and the wave quickens with the crowd.

  • Free
  • AI Components
  • Spring

Like Typing Indicator? 287 more are in Pro.

Pro unlocks all 287 Pro components, every template and block, and everything we release next. Typing Indicator stays free.

Set it up, copy the code

Choose values for the main props and the JSX on the right updates to match.

Show the dots (true) or the message (false). Leave it out and the component runs by itself.

The message the bubble opens into when typing stops.

Colours for a light or a dark page.

Alternates between typing and the message until the visitor touches it. Never runs under reduced motion.

Your JSX

<TypingIndicator
  typing={false}
  message="Ten minutes. I'm bringing the files."
  tone="light"
  autoplay={false}
/>

Props

PropTypeDefaultWhat it does
names["Maya"]Who is typing. Drives the label and the avatars. An empty list shows the dots alone.
typing—Show the dots (true) or the message (false). Leave it out and the component runs by itself.
message"Ten minutes. I'm bringing the files."The message the bubble opens into when typing stops.
tone"light"Colours for a light or a dark page.
autoplayfalseAlternates between typing and the message until the visitor touches it. Never runs under reduced motion.
className""Extra classes for the outer element.

Add it to your project

  1. 1

    Set up your project once

    You need a Next.js project with Tailwind CSS and the @/ import alias. In its root folder, run this once. It creates components.json and the cn() helper in src/lib/utils.ts:

    npx shadcn@latest init -d

    Starting from nothing? The Quick Start walks through the whole thing.

  2. 2

    Connect the registry

    Run this once per project. It writes the Nexus UI entry into components.json for you:

    npx shadcn@latest registry add "@nexus-labs=https://www.nexus-ui.com/api/registry/{name}"

    Type it exactly as shown. {name} is filled in by the CLI with the component you ask for, so you never replace it.

  1. 3

    Add the component

    Run this from your project root. It adds the component, the helpers it imports and its npm packages.

    npx shadcn@latest add @nexus-labs/typing-indicator
  2. 4

    Check what was added

    With a project made as in the Quick Start (a src/ folder), these files land in it:

    components/
    typing-indicator/
    index.ts
    typing-indicator.tsx
  3. 5

    Copying by hand? Skip the registry

    Instead of steps 2 and 3 you can copy the files yourself, with no registry and no API key. Step 1 still applies, so that cn() exists. Install the packages:

    npm install framer-motion

    Then show the source and create each file at the path it gives:

  4. 6

    Use it in a page

    Installing only adds the files. Import the component in a page and render it. The Usage tab on the preview shows a fuller example with props:

    // src/app/page.tsx
    import { TypingIndicator } from "@/components/typing-indicator";
    
    export default function Page() {
      return (
        <main>
          <TypingIndicator />
        </main>
      );
    }

Like Typing Indicator? 287 more are in Pro.

Pro unlocks all 287 Pro components, every template and block, and everything we release next. Typing Indicator stays free.

Typing Indicator questions

How do I install the typing indicator?

Run `npx shadcn@latest add @nexus-labs/typing-indicator`. It adds the component and installs framer-motion.

How do I control when it shows the dots?

Pass `typing` as true while the other person is typing and false when their message lands. Without `typing` the component runs by itself, and pressing the bubble switches it.

Can it show more than one person typing?

Yes. Pass several names and it stacks up to three avatars and writes "Maya and Leo are typing". The wave quickens a little with each extra person.

Is it accessible?

A polite live region announces who is typing and then the message. The animated bubble is hidden from screen readers so nothing is read twice, and it stays still under reduced motion.

Does it work in dark mode?

Set `tone="dark"` for dark bubbles and labels. Both tones use fixed colours, so they look the same whatever the page theme is.