npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cool-ai-chatbot

v0.1.5

Published

A reusable React + TypeScript AI chatbot widget with personalities and adaptive themes.

Readme

Cool AI Chatbot

A reusable React + TypeScript chatbot widget with built-in personalities, adaptive themes, and a developer-friendly setup.

Perfect for websites that want a customizable AI assistant without building a chat interface from scratch.


Installation

npm install cool-ai-chatbot

Quick Start

import { ChatBot } from "cool-ai-chatbot";
import "cool-ai-chatbot/style.css";

function App() {
  return (
    <ChatBot
      endpoint="/api/chat"
      defaultOpen={false}
      position="bottom-right"
    />
  );
}

export default App;

How It Works

Visitor
   ↓
Cool AI Chatbot
   ↓
Your React Application
   ↓
Your Backend Endpoint
   ↓
Your AI Provider
   ↓
Response
   ↓
Visitor

Cool AI Chatbot provides the chat interface.

Your backend provides the AI response.

This design allows you to use any AI provider without changing the widget.


Features

  • React + TypeScript support
  • Floating chatbot widget
  • Adaptive theme engine
  • Manual theme selection
  • Personality-based themes
  • Built-in personalities
  • Local chat storage
  • Custom AI endpoint support
  • Mobile-friendly design
  • Included CSS styling

Included Personalities

Purple Wiz

A friendly and curious guide focused on learning, exploration, and encouragement.

ASL Tutor

Designed to support sign language learning and communication.

Tour Guide

A welcoming personality for information, navigation, and discovery.


Adaptive Theme Example

<ChatBot
  endpoint="/api/chat"
  source="adaptive"
/>

Manual Theme Example

<ChatBot
  endpoint="/api/chat"
  source="manual"
  manualThemeId="purple-wiz"
/>

Styling

import "cool-ai-chatbot/style.css";

Without this import, the chatbot will render without its intended styling.


Backend Setup

This package requires a backend endpoint.

Example:

<ChatBot endpoint="/api/chat" />

Your backend should:

  1. Receive the user's message.
  2. Send the message to your AI provider.
  3. Return the AI response.
  4. Keep API keys secure.

Environment Variables

Store AI credentials in your backend.

Examples:

OPENAI_API_KEY=your_key_here

# Or

GEMINI_API_KEY=your_key_here

# Or

ANTHROPIC_API_KEY=your_key_here

Never place API keys directly in React components or frontend code.


Example Backend (OpenAI)

This example uses OpenAI, but you may replace it with any AI provider.

import OpenAI from "openai";
import express from "express";

const app = express();

app.use(express.json());

const client = new OpenAI({
  apiKey: process.env.OPENAI_API_KEY,
});

app.post("/api/chat", async (req, res) => {
  const { message } = req.body;

  const response = await client.responses.create({
    model: "gpt-5.5",
    input: message,
  });

  res.json({
    response: response.output_text,
  });
});

Example Response Format

Your endpoint should return:

{
  "response": "Hello! How can I help you today?"
}

As long as your backend returns this format, Cool AI Chatbot can work with virtually any AI provider.


Supported AI Providers

Examples include:

  • OpenAI
  • Google Gemini
  • Anthropic Claude
  • Ollama
  • Azure OpenAI
  • Local LLMs
  • Custom AI services

Status

Current Version: 0.1.5

Cool AI Chatbot is actively under development.

Current focus areas include:

  • Expanded personality system
  • Localization support
  • Additional themes
  • Accessibility improvements
  • Enhanced developer configuration

Future examples may include:

examples/
├── openai/
├── gemini/
├── claude/
└── ollama/

Breaking changes may occur during early releases as the package evolves.


License

MIT