How to integrate Release0 with React
Integrate Release0 agents in React applications using optimized components for seamless user experiences. This guide provides usage examples and integration methods for React projects.
Installation
To install the required package, use the following command:
Standard Integration
The Standard
component creates a container with a width of 100% (matching the parent width) and a height of 600px.
Popup Integration
The Popup
component automatically triggers a popup window after a specified delay. The example below triggers it after 3 seconds:
Bubble Integration
The Bubble
component displays a bubble with a preview message. In this example, the message appears after 5 seconds, and you can customize the theme and avatar:
Additional Configuration
To prefill agent variables in your embed code, use the prefilledVariables
option. The example below pre-populates values for Current URL
and User name
:
Note: If your site URL contains query parameters (e.g.,
https://release0.com?User%20name=John%20Doe
), these variables are automatically injected into the bot. Manual transfer is not necessary.
Validation and Testing
Before deploying, ensure:
- All components are rendering as expected.
- Variables are being prefilled correctly.
- Auto-show delays and custom themes match your requirements.