@webcallhub/widget
v1.0.2
Published
Add a click-to-call widget to any website. AI receptionist answers 24/7, qualifies leads, books appointments. Browser-to-browser WebRTC voice calls.
Maintainers
Readme
@webcallhub/widget
Add a click-to-call widget to any website. AI receptionist answers 24/7, qualifies leads, and books appointments. Browser-to-browser WebRTC voice calls — no phone system needed.
Install
npm install @webcallhub/widgetQuick Start
Vanilla JavaScript
import { WebCallHub } from '@webcallhub/widget';
WebCallHub.init({
siteKey: 'your-site-key',
position: 'bottom-right',
label: 'Talk to Us',
});React
import { WebCallHubWidget } from '@webcallhub/widget/react';
function App() {
return (
<WebCallHubWidget
siteKey="your-site-key"
position="bottom-right"
label="Talk to Us"
onReady={() => console.log('Widget loaded')}
/>
);
}Script Tag (no bundler)
<script src="https://webcallhub.com/embed/widget.js" data-tenant="YOUR_SITE_KEY" async></script>Options
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| siteKey | string | required | Your site key from webcallhub.com |
| position | string | 'bottom-right' | 'bottom-right' or 'bottom-left' |
| label | string | 'Talk to Us' | Button label text |
| color | string | '#22c55e' | Primary button color (hex) |
| context | string | — | AI context prompt for the receptionist |
| tenant | string | — | Tenant slug (auto-detected from site key) |
API
import { WebCallHub } from '@webcallhub/widget';
// Initialize
await WebCallHub.init({ siteKey: 'your-key' });
// Show/hide
WebCallHub.show();
WebCallHub.hide();
// Remove completely
WebCallHub.destroy();
// Check state
WebCallHub.isInitialized(); // true/falseFrameworks
Works with React, Vue, Angular, Svelte, Next.js, Nuxt, Astro, Remix, and any framework that supports npm packages. For SSR frameworks, call WebCallHub.init() in a client-side effect (useEffect, onMounted, etc.).
Get Your Site Key
- Sign up free at webcallhub.com/signup
- Add your domain
- Copy your site key
Free plan: 1 agent, 200 min/month, no credit card required.
Links
License
MIT
