Quick Start
Add these lines to your HTML:Installation Options
CDN (unpkg)
CDN (jsDelivr)
Self-hosted
Download the files and host them yourself:Initialization
JavaScript API
Data Attributes (Auto-initialization)
Use data attributes for simpler setup:Authentication Options
Direct API (Bearer Token)
Proxy Mode
When your backend handles authentication:Configuration Options
Dynamic Token Updates
Update the session token without re-initializing:Full Example
Basic Implementation
Embedded in Existing Page
With Proxy Backend
Styling & Customization
Container Sizing
The widget fills its container. Control size via the container:Custom Styling
Override CSS variables:WordPress Integration
Add to your theme’sfooter.php or use a custom HTML block:
Troubleshooting
Widget Not Appearing
- Check the container exists:
document.getElementById('cuadra-chat') - Ensure CSS is loaded before the script
- Check browser console for errors
- Verify container has explicit height
Authentication Errors
- Check session token is valid
- Verify API key has correct permissions
- Use browser Network tab to inspect requests
Styling Issues
- Ensure CSS file is loaded
- Check for CSS conflicts with your site
- Use browser DevTools to inspect elements
Next Steps
React Components
Use native React components for more control
API Reference
Build custom chat implementations