@pearl.com/pearl-widget-react
v1.0.0
Published
React component wrapper for the Pearl Widget iframe
Readme
@pearl.com/pearl-widget-react
React component for embedding the Pearl Widget iframe in your application. Easily initialize the widget with an access key and mode for interactive chat or expert systems powered by Pearl.
✨ Features
- Embeds a secure iframe widget from Pearl
- Configurable via
accessKeyandmode - Initializes via
postMessageon iframe load - Simple React integration
By default chat starts in pearl-ai mode. To enable other mods you need to obtain accessKey here.
📦 Installation
npm install @pearl.com/pearl-widget-react🚀 Usage
import { PearlWidget } from '@pearl.com/pearl-widget-react';
<PearlWidget accessKey="your-access-key" mode="pearl-ai" />🛠️ Props
| Prop | Type | Description |
|----------|----------|-----------------------------------------------------------------------------|
| accessKey | string | Optional. Key to authenticate the widget session. |
| mode | string | Optional. Widget mode: expert, pearl-ai, pearl-ai-verified, pearl-ai-expert |
🧑💻 Development
To build locally:
npm run build📄 License
MIT
