Overview
TheChatTypingIndicator component displays a simple, elegant animation of three pulsing dots to indicate that the chat agent is actively processing a response. This provides visual feedback to users during the waiting period between sending a message and receiving a response.
Props
This component accepts no props. It is a self-contained visual indicator.Usage
Features
Animation
Three circular dots animate in sequence with a pulsing effect:- Dot 1: Animation starts immediately (0ms delay)
- Dot 2: Animation starts after 200ms delay
- Dot 3: Animation starts after 400ms delay
Styling
Animation Timing
Custom Animation
The component uses a customanimate-blink class which should be defined in your Tailwind configuration:
Visual Design
Layout
The component uses flexbox for horizontal alignment:- Display:
flex - Direction: Row (default)
- Alignment: Center (items-center)
- Gap: 0.25rem (4px) between dots
Use Cases
1. AI Response Loading
2. Stream Processing
3. Custom Message Container
Accessibility
Consider adding ARIA attributes when using this component:Performance
The component is highly performant:- No JavaScript animations: Uses pure CSS animations
- No state management: Completely stateless
- No props validation: Zero runtime overhead
- Small bundle size: Minimal code footprint
Customization
You can customize the appearance by wrapping the component:Related Components
ChatMessage
Displays actual chat messages
ChatInput
Input with loading state integration