superproducer-chat-widget
v1.0.1
Published
A chat widget powered by SuperProducer AI for your car dealership's website. Works with any website including Dealer Center, Autotrader, Cars.com, CarGurus, Autofunds, etc.
Downloads
30
Maintainers
Readme
SuperProducer Chat Widget
A lightweight chat widget for embedding AI-powered conversations on your website.
Installation
CDN (Recommended)
Add the following to your HTML:
<script src="https://unpkg.com/superproducer-chat-widget" async></script>Or use jsDelivr:
<script src="https://cdn.jsdelivr.net/npm/superproducer-chat-widget" async></script>npm
npm install superproducer-chat-widgetUsage
Add the widget to your page:
<!DOCTYPE html>
<html>
<head>
<title>Your Website</title>
</head>
<body>
<!-- Your website content -->
<!-- Add SuperProducer Chat Widget -->
<script src="https://unpkg.com/superproducer-chat-widget" async></script>
<superproducer-chat
public-key="your-public-key"
assistant-id="your-assistant-id"
mode="chat"
theme="light"
></superproducer-chat>
</body>
</html>Attributes
| Attribute | Type | Description | Default |
|-----------|------|-------------|---------|
| public-key | string | Required. Your public API key | - |
| assistant-id | string | Required. Your assistant ID | - |
| mode | string | Widget mode: "chat" or "voice" | "chat" |
| theme | string | Color theme: "light" or "dark" | "light" |
| position | string | Widget position on screen | "bottom-right" |
| button-color | string | Custom button background color | - |
| button-text-color | string | Custom button text color | - |
| button-position | string | Button position configuration | - |
JavaScript API
You can programmatically control the widget:
// Get the widget element
const chat = document.querySelector('superproducer-chat');
// Open the chat
chat.open();
// Close the chat
chat.close();
// Toggle the chat
chat.toggle();Development
Setup
npm installBuild
npm run buildWatch mode
npm run devPublishing
To publish to npm (which makes it available on unpkg.com):
npm login
npm publishLicense
MIT
