Skip to content

Chat bubble with typing indicator in React

A help block shaped like a conversation: bubbles, three animated typing dots and clickable quick replies that show your answers to frequent questions, frozen under prefers-reduced-motion.

Here is an excerpt of this component's code in React. The full code is free for members, ready to copy into your project.

This component also comes in

Open in a new tab

The code in React

ChatTypingBubble.tsx
import { useEffect, useRef } from "react";

const styles = `
.etcb-msg {
  animation: etcb-pop 0.32s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.etcb-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;

Free component: copy it freely, including for commercial projects.

Visual effects components in React
  • Cards that fade in as they enter the screen, one after another in each row, without a line of JavaScript and with a static fallback.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A translucent card with a saturated blur whose sharper edge refracts the colourful shapes drifting behind it, with an opaque fallback when transparency is reduced.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A paragraph whose words turn from grey to full ink, one by one, as the page scrolls, in pure CSS with a plain-text fallback.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Four offset, translucent sine waves gently roll along the bottom of a section, each at its own pace.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A row of cards where the hovered card lights up with a halo that follows the mouse and brightens its edge closest to the pointer.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component