@molecule/app-typing-indicator-react
Feature · typing-indicator · App (browser) · v4.1.1 · Apache-2.0
Three-dot animated typing indicator for chat UIs
npm install @molecule/app-typing-indicator-reactHow it works
@molecule/app-typing-indicator-react is a ready-made typing-indicator feature for the app (browser) side. It composes the core interfaces it needs, so it works with whichever providers your app has bonded.
import { TypingIndicator } from '@molecule/app-typing-indicator-react'
const isTyping = true
<TypingIndicator visible={isTyping} ariaLabel="Alice is typing…" />Works with: @molecule/app-react, @molecule/app-ui, @molecule/app-ui-react
Reference
Three-dot typing indicator for chat UIs.
Exports <TypingIndicator> — CSS-only three-dot pulse animation.
Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit
src/index.tsJSDoc, not this file.
Quick Start
import { TypingIndicator } from '@molecule/app-typing-indicator-react'
const isTyping = true
<TypingIndicator visible={isTyping} ariaLabel="Alice is typing…" />
Type
feature
Installation
npm install @molecule/app-typing-indicator-react @molecule/app-react @molecule/app-ui @molecule/app-ui-react react
npm install -D @types/react
API
Interfaces
TypingIndicatorProps
Props for the TypingIndicator component.
interface TypingIndicatorProps {
/** Whether to render. Defaults to true. */
visible?: boolean
/** Dot diameter in CSS pixels or native dp. Defaults to 6. */
dotSize?: number
/** Animation duration in ms. Defaults to 1200. */
durationMs?: number
/**
* Accessible label. Overrides the translated / `defaultValue` `'Typing…'`
* (prop > `t()` > default).
*/
ariaLabel?: string
/** Extra classes. */
className?: string
}
Functions
TypingIndicator(props)
Three-dot "typing…" status. The dots pulse in sequence and stay still when the browser or device requests reduced motion.
function TypingIndicator({
visible = true,
dotSize = 6,
durationMs = 1200,
ariaLabel,
className,
}: TypingIndicatorProps): JSX.Element | null
props— Component props (seeTypingIndicatorProps).
Injection Notes
Requirements
Peer dependencies:
@molecule/app-react^4.0.0 || ^5.0.0@molecule/app-ui^1.9.0@molecule/app-ui-react^4.7.0react^18.0.0 || ^19.0.0
Runtime Dependencies
@molecule/app-react@molecule/app-ui@molecule/app-ui-reactreact
Dots use currentColor, so the indicator inherits the surrounding text
color — wrap it in a muted-text container to dim it. The default
ariaLabel is the translated typingIndicator.aria.label (English
'Typing…', via @molecule/app-locales-typing-indicator); the ariaLabel
prop overrides it. Each instance injects its own <style> tag for the
keyframes (fine for a chat view; avoid hundreds at once). Props (documented
on the exported TypingIndicatorProps interface): visible (default true),
dotSize (px, default 6), durationMs (default 1200), ariaLabel, className.
Translations
Translation strings are provided by @molecule/app-locales-typing-indicator.