simple-site-bot
v1.0.0
Published
A simple customizable chatbot for websites
Readme
💬 simple-site-bot
A lightweight and customizable chatbot widget for any website. Easily integrate FAQ-based conversation support and style it to match your brand — all in under 5 minutes.
📦 Installation
Install using npm:
npm install simple-site-botOr via Yarn:
yarn add simple-site-bot🌐 CDN (Optional)
You can also include it directly via a <script> tag (great for static sites):
<script src="https://unpkg.com/simple-site-bot"></script>🚀 Usage Example
HTML
Add the following HTML to your website:
<div id="chat-button">💬</div>
<div id="chat-window" class="hidden">
<div id="chat-header">ChatBot</div>
<div id="chat-body"></div>
<form id="chat-form">
<input
type="text"
id="user-input"
placeholder="Type your message..."
required
/>
<button type="submit">Send</button>
</form>
</div>JavaScript (ES6)
import SimpleSiteBot from "simple-site-bot";
const myBot = new SimpleSiteBot({
faq: [
{ q: "hello", a: "Hi there! How can I help you today?" },
{ q: "pricing", a: "Our pricing starts at $9.99/month." },
{ q: "contact", a: "You can reach us at [email protected]" },
],
headerText: "Support Assistant",
buttonIcon: "💬",
theme: "#4f46e5",
});
myBot.init();⚙️ Options
| Option | Type | Description |
| ------------- | -------- | ----------------------------------------------------------------- |
| faq | Array | List of { q: "question", a: "answer" } pairs |
| headerText | string | Text to display at the top of the chat window |
| buttonIcon | string | Emoji or icon HTML to show on the chat button |
| theme | string | Hex color code for the chatbot theme (used for button and header) |
| typingDelay | number | Delay before bot reply in milliseconds (default: 1200) |
🧠 Features
- 🗨️ Match user questions from a customizable FAQ
- 💅 Beautiful UI with customizable colors and modern animations
- 🧩 Works with any frontend stack (HTML, React, Vue, etc.)
- ⚡ Lightweight and fast (~6 KB minified)
📂 Contributing
- Fork the repo
- Create a new branch (
git checkout -b feature-name) - Commit your changes (
git commit -am 'Add new feature') - Push to the branch (
git push origin feature-name) - Create a pull request
- Github : https://github.com/Nikhilkumar2311/site-bot
