@tawasolai/widget
v1.0.5
Published
Embeddable Tawasol AI web widget for script-tag and npm-based installs.
Maintainers
Readme
@tawasolai/widget
Embeddable Tawasol AI web widget for websites and frontend apps.
This package supports two integration styles:
- npm/package install for teams with their own frontend build pipeline
- browser script bundle via
dist/widget.jsfor script-tag embeds
Install
npm install @tawasolai/widgetUsage
import { mountWidget } from '@tawasolai/widget'
mountWidget({
widgetKey: 'YOUR_WIDGET_KEY',
apiBase: 'https://api.tawasol-ai.com/api/widget',
})Options
widgetKey: public widget key from Tawasol AIapiBase: widget API base URL, for examplehttps://api.tawasol-ai.com/api/widget
Script Bundle
If you need the browser-ready bundle instead of npm import usage, build or use:
dist/widget.js
Example:
<script
src="/widget.js"
data-widget-key="YOUR_WIDGET_KEY"
data-api-base="https://api.tawasol-ai.com/api/widget"
></script>