Darrow

Chatbot Widget Example

This page demonstrates the embeddable chatbot widget.

The chatbot button should appear in the bottom-right corner.

Usage Quick Start

To embed the chatbot on your website, add this to your HTML:

<script src="chatbot.js"></script>

Customization Optional

You can customize the chatbot by adding a config object before loading the script:

<script>
  window.ChatbotConfig = {
    botName: "Darrow",
    primaryColor: "#bd514a",
    apiUrl: "/chat"
  };
</script>
<script src="chatbot.js"></script>

API Endpoint

The chatbot expects a POST endpoint at /chat that:

  • Accepts: { "message": "user text" }
  • Returns: { "reply": "bot text" }
Note:

This example page doesn't have a backend API, so the chatbot will show an error when you try to send a message. You'll need to set up your own API endpoint.