Quick Reference for AI Agents & Developers
Available via: SDK | UI Kits
Send Typing Indicator
Start Typing
Notify the recipient that you’ve started typing:- To User
- To Group
Stop Typing
Notify when you’ve stopped typing:- To User
- To Group
Receive Typing Indicators
Listen for typing events from other users:TypingIndicator Properties
| Property | Method | Description |
|---|---|---|
| Sender | getSender() | User object of who is typing |
| Receiver ID | getReceiverId() | UID or GUID of recipient |
| Receiver Type | getReceiverType() | user or group |
| Metadata | getMetadata() | Custom data (optional) |
Add Custom Metadata
Send additional data with typing indicators:Implementation Example
Here’s a complete implementation with debouncing:UI Display Example
React Hook Example
Best Practices
Debounce typing events
Debounce typing events
Don’t send
startTyping on every keystroke. Use a debounce to avoid flooding the server.Auto-stop after inactivity
Auto-stop after inactivity
Automatically call
endTyping after 2-3 seconds of no input to handle cases where users abandon typing.Stop on message send
Stop on message send
Always call
endTyping when a message is sent to immediately clear the typing indicator.Handle component unmount
Handle component unmount
Call
endTyping when the chat component unmounts to clean up any active typing state.