AI Web Support
React Hooks & Components
Build custom UIs with our React hooks and components
What’s This About?
Want to build your own custom chat UI? We provide React hooks and components that make it easy to:
- Create custom chat interfaces
- Manage chat state
- Handle messages and responses
- Build your own UI components
Basic Setup
First, wrap your app with our WidgetRoot
provider:
Available Options
Useful Hooks
1. useChat Hook
The main hook for chat functionality:
2. useConfigData Hook
Access your widget configuration:
3. Message Rating Hooks
Add thumbs up/down to messages:
Custom Message Components
You can create custom components for different message types:
Remember to:
- Always wrap your app with
WidgetRoot
- Handle loading and error states
- Consider mobile responsiveness
Need help? Check out our example repo or join our Slack community!
Was this page helpful?