@franklinhelp/sdk-chat-widget
v0.1.0-alpha.5
Published
Chat widget SDK for Franklin - shared between dashboard preview and embeddable widget
Maintainers
Readme
@franklinhelp/sdk-chat-widget
Chat widget SDK for Franklin - shared between dashboard preview and embeddable widget.
Installation
npm install @franklinhelp/sdk-chat-widgetUsage
Script Tag (HTML)
<script
src="https://unpkg.com/@franklinhelp/sdk-chat-widget@latest/dist/index.global.js"
data-franklin-site-key="YOUR_SITE_KEY"
data-franklin-assistant-id="YOUR_ASSISTANT_ID"
data-franklin-api-url="https://app.franklinhelp.com"
async
></script>React Component
import { ChatWidget } from "@franklinhelp/sdk-chat-widget/react";
<ChatWidget
siteKey="YOUR_SITE_KEY"
assistantId="YOUR_ASSISTANT_ID"
apiBaseUrl="https://app.franklinhelp.com"
/>Features
- Chat interface with message history
- FAQs search and display
- Feedback collection
- Navigation between views
- Real-time message updates
- Citation support
- Customizable branding
Widget Status
The widget respects the status field of the website assistant:
active: Widget is visible and functionalinactive: Widget will not render (initialization fails gracefully)
Development
# Build
pnpm build
# Watch mode
pnpm dev