chat-widget-ai-v2 0.6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # AI Chat Widget Integration Guide
2
+
3
+ This guide explains how to embed the **Chat Widget AI** into your website using a simple HTML script.
4
+
5
+ ---
6
+
7
+ ## 🧩 1. Add a Container Element
8
+ Add a container element with a specific ID where the widget will be mounted.
9
+
10
+ ```html
11
+ <div id="your-container-id"></div>
12
+ ```
13
+
14
+ Replace `your-container-id` with any ID you prefer.
15
+
16
+ ---
17
+
18
+ ## 📥 2. Insert the Widget Script
19
+ Paste the following script into your main HTML file, ideally **right before the closing `</body>` tag**. This ensures the widget loads properly.
20
+
21
+ ```html
22
+ <script src="https://unpkg.com/chat-widget-ai@latest/dist/chat-widget.umd.js"></script>
23
+ <script>
24
+ document.addEventListener("DOMContentLoaded", () => {
25
+ ChatWidget.init({
26
+ containerId: 'your-container-id', // Change to match your HTML element ID
27
+ idWidget: 'YOUR_WIDGET_ID',
28
+ groupId: 'YOUR_GROUP_ID',
29
+ useFullscreen: false,
30
+ alwaysOpenWidget: false
31
+ });
32
+ });
33
+ </script>
34
+ ```
35
+ Replace:
36
+ - `YOUR_WIDGET_ID` with your actual widget ID
37
+ - `YOUR_GROUP_ID` with your account `groupId`
38
+
39
+ ---
40
+
41
+ ## 💾 3. Save Your File
42
+ After editing your HTML file, save and refresh your website.
43
+
44
+ ---
45
+
46
+ ## ✅ 4. Verify Widget is Working
47
+ Open your website and ensure the AI Chat Widget appears as expected.
48
+
49
+ If everything is configured correctly, the widget should load instantly.
50
+
51
+ ---
52
+
53
+ ## 📌 Notes
54
+ - Make sure the scripts are placed **after** the container element in the HTML structure.
55
+ - If you're using a modern framework like Next.js, React, or Vue, placement may differ.
56
+
57
+ ---
58
+
59
+ Need help? Feel free to reach out!