@aligly/chatbot-react
v0.0.1
Published
A production-grade, lightweight AI Chat Widget for Aligly. Encapsulated with Shadow DOM, supports dynamic theming, and integrates seamlessly with React or via a simple script tag.
Downloads
129
Readme
@aligly/chatbot-react
A production-grade, lightweight AI Chat Widget for Aligly. Encapsulated with Shadow DOM, supports dynamic theming, and integrates seamlessly with React or via a simple script tag.
🚀 Features
- Shadow DOM Isolation: No CSS conflicts with the host website.
- Dynamic Theming: Automatically adapts to host light/dark mode and brand colors.
- Lazy Loading: Iframe loads only when the widget is opened.
- Secure: Origin-validated
postMessagecommunication. - Universal: Works with React or plain HTML.
📦 Installation
npm install @aligly/chatbot-react🛠️ Usage
React Integration
import { OneAppAgentWidget } from '@aligly/chatbot-react';
function App() {
return (
<OneAppAgentWidget
agentId="your-agent-id"
baseUrl="https://app.oneapp.ai"
themeColor="#4f46e5"
/>
);
}Script Tag Integration
<script
src="https://unpkg.com/@aligly/chatbot-react/index.iife.js"
data-agent-id="your-agent-id">
</script>📄 License
MIT
