TypingIndicator
Animated typing indicator for chat and AI interfaces — 2 variants (dots bounce, cursor blink), 3 sizes, 3 colors, speed control, and optional label
2
Variants
3
Sizes
3
Colors
Pure
React
Playground
Preview
dotsdefaultmuted
Variant
Size
Color
Speed
Options
<TypingIndicator />Variants
Dots
Three dots bouncing in sequence — ideal for chat bubbles
Chat
Cursor
Blinking text cursor — ideal for indicating AI is thinking
AI
Sizes
smDot4px
Cursor2×14px
defaultDot6px
Cursor2.5×20px
lgDot8px
Cursor3×26px
| Size | Dot | Cursor | Preview | |
|---|---|---|---|---|
sm | 4px | 2×14px | ||
default | 6px | 2.5×20px | ||
lg | 8px | 3×26px | ||
Features
Color
Three color options adapt to various backgrounds and themes.
<TypingIndicator color="default" />
<TypingIndicator color="primary" />
<TypingIndicator color="muted" />Speed
Adjust animation speed in three steps. Available for the dots variant only.
<TypingIndicator speed="slow" />
<TypingIndicator speed="default" />
<TypingIndicator speed="fast" />Label
Enable showLabel to display a text label alongside the animation.
AI is typing...
<TypingIndicator showLabel label="AI is typing..." />API
Component Structure
TypingIndicator— Pure ReactStandalone component — no sub-components
Props
variant"dots""dots" | "cursor"Animation style — dots: bouncing dots, cursor: blinking cursor
size"default""sm" | "default" | "lg"Size
color"muted""default" | "primary" | "muted"Color — default: foreground, primary: brand, muted: subtle color
speed"default""slow" | "default" | "fast"Animation speed (dots variant only)
label"Typing"stringAccessible label (aria-label) and text shown when showLabel is true
showLabelfalsebooleanRender label text alongside the indicator
classNameundefinedstringAdditional CSS classes
| Name | Type | Default | Description |
|---|---|---|---|
variant | "dots" | "cursor" | "dots" | Animation style — dots: bouncing dots, cursor: blinking cursor |
size | "sm" | "default" | "lg" | "default" | Size |
color | "default" | "primary" | "muted" | "muted" | Color — default: foreground, primary: brand, muted: subtle color |
speed | "slow" | "default" | "fast" | "default" | Animation speed (dots variant only) |
label | string | "Typing" | Accessible label (aria-label) and text shown when showLabel is true |
showLabel | boolean | false | Render label text alongside the indicator |
className | string | undefined | Additional CSS classes |
Anatomy
1
2
3
label
4
1
Container
Flex container (role=status + aria-live)
2
Dot
Bouncing dot (×3)
3
Cursor
Blinking cursor
4
Label
Optional label text
Best Practices
✓
Recommended
- ✓Show while waiting for a reply in chat UI
- ✓Use the dots variant during AI response generation
- ✓Use showLabel to provide context for screen readers
✕
Don't
- ✕Don't use TypingIndicator for long loading — use Spinner instead
- ✕Don't use for full-page loading — intended for chat UI
- ✕Don't leave the animation running in the background indefinitely
Accessibility
ARIA / WCAG
role="status"— applied automaticallyaria-label="Typing"— default valuelabelprop for custom label- prefers-reduced-motion supported