Thinking
Animated thinking/loading indicator component
The Thinking component displays an animated thinking indicator using dots. It's commonly used to show that the system is processing or waiting for a response.
import { Thinking } from "@pipecat-ai/voice-ui-kit";
<Thinking />Component Variants
Thinking
The Thinking component displays animated dots to indicate processing.
| Prop | Type | Default |
|---|---|---|
initialDots? | number | 1 |
maxDots? | number | 3 |
interval? | number | 500 |
className? | string | "" |
aria-label? | string | "Loading" |
Usage
Custom Dot Count
Adjust the maximum number of dots.
import { Thinking } from "@pipecat-ai/voice-ui-kit";
<div className="space-y-2">
<Thinking maxDots={5} />
</div>Custom Animation Speed
Adjust the animation interval.
import { Thinking } from "@pipecat-ai/voice-ui-kit";
<div className="space-y-2">
<Thinking interval={1000} />
</div>Custom Styling
Apply custom classes for styling.
import { Thinking } from "@pipecat-ai/voice-ui-kit";
<Thinking
className="text-primary text-lg font-bold tracking-widest"
/>Custom Initial State
Start with a different number of dots.
import { Thinking } from "@pipecat-ai/voice-ui-kit";
<Thinking initialDots={2} maxDots={4} />Animation Behavior
The component:
- Starts with
initialDotsnumber of dots - Increments the dot count every
intervalmilliseconds - Cycles back to 1 when it reaches
maxDots - Continues animating until the component is unmounted
Default Behavior
By default:
- Starts with 1 dot
- Cycles through 1, 2, 3 dots
- Updates every 500ms
- Displays "Loading" as the ARIA label
Integration
The Thinking component is commonly used:
- In
MessageContentto show when the assistant is processing - As a loading indicator in various UI contexts
- To indicate waiting states in conversation flows
It's a standalone component that doesn't require any context providers.