Chat bubble with typing indicator in WordPress
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 WordPress. The full code is free for members, ready to copy into your project.
This component also comes in
The code in WordPress
<?php
/**
* Plugin Name: Forge, Bulle de chat avec indicateur de saisie
* Description: Un bloc d’aide en forme de conversation : bulles, trois points de saisie animés et réponses rapides cliquables qui affichent vos réponses aux questions fréquentes, figé sous prefers-reduced-motion. Ajoute la composition « Bulle de chat avec indicateur de saisie » à l'éditeur de blocs.
* Version: 1.0.0
* Requires at least: 6.6
* Requires PHP: 8.1
* Author: Forge
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: forge-effet-texte-conversationnel-bulle-saisie
*<!-- wp:html -->
<section class="etcb-card" aria-labelledby="etcb-titre" data-etcb>
<div class="etcb-head">
<span class="etcb-avatar" aria-hidden="true">CL</span>
<div>
<h2 class="etcb-title" id="etcb-titre">Une question sur votre vélo ?</h2>
<p class="etcb-sub">Cycles Lambert, Grenoble · réponses instantanées</p>
</div>
</div>
<div class="etcb-log" role="log" aria-label="Conversation avec l’atelier" tabindex="0" data-etcb-log>
<div class="etcb-msg etcb-row" data-etcb-bot>
<p class="etcb-bubble"><span class="etcb-sr">L’atelier : </span><span data-etcb-text>Bonjour ! Je réponds aux questions les plus fréquentes de l’atelier. Choisissez-en une ci-dessous.</span></p>(() => {
if (!document.querySelector(".etcb-card")) return;
document.querySelectorAll("[data-etcb]").forEach((root) => {
const on = (el, type, fn) => el.addEventListener(type, fn);
const offs = [];
const log = root.querySelector("[data-etcb-log]");
const typing = root.querySelector("[data-etcb-typing]");
const userProto = root.querySelector("[data-etcb-proto]");
const botProto = root.querySelector("[data-etcb-bot]");
const buttons = [...root.querySelectorAll("[data-etcb-ask]")];
const reduce = matchMedia("(prefers-reduced-motion: reduce)");
let timer = 0;:root {
--etcb-card: #ffffff;
--etcb-border: #d5e3e0;
--etcb-text: #0f172a;
--etcb-muted: #475569;
--etcb-log: #f4f8f7;
--etcb-bubble: #ffffff;
--etcb-accent: #0f766e;
--etcb-accent-text: #ffffff;
--etcb-hover: #f0fdfa;
--demo-effet-texte-conversationnel-bulle-saisie-bg: #e8f0ee;
--demo-effet-texte-conversationnel-bulle-saisie-text: #0f172a;Free component: copy it freely, including for commercial projects.
Other visual effects components in WordPress
Visual effects components in WordPress
A large heading whose words turn from grey to ink as the page scrolls, then whose key phrases get a marker stroke, in pure CSS with a readable fallback.
- Tailwind
- React
- CSS
- WordPress

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

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

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

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

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