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

panda-chat-widget

v1.0.0

Published

A modern, highly customizable chat widget that can be integrated into any web platform. It is available in three formats: **Standalone HTML/JS**, **React (JSX)**, and **React (TypeScript/TSX)**.

Readme

Chatbox Widget Documentation

A modern, highly customizable chat widget that can be integrated into any web platform. It is available in three formats: Standalone HTML/JS, React (JSX), and React (TypeScript/TSX).


1. Standalone HTML/JavaScript Integration

Ideal for static websites, PHP, or CMS platforms like WordPress.

Installation

  1. Copy chatbox-pop.js and chatbox-pop.css from the public/plane_HTML/ folder to your project.
  2. Include the CSS and JavaScript in your HTML file:
<!DOCTYPE html>
<html>
<head>
    <!-- 1. Include Stylesheet -->
    <link rel="stylesheet" href="chatbox-pop.css">
</head>
<body>
    <!-- 2. Widget Container -->
    <div id="chatboxpop"></div>

    <!-- 3. Configuration (Optional) -->
    <script>
        window.CHAT_WIDGET_CONFIG = {
            title: "Support Chat",
            subtitle: "Online",
            welcomeMessage: "Hi! How can we help?",
            theme: {
                primary: "#4f46e5",
                headerText: "#ffffff"
            }
        };
    </script>

    <!-- 4. Include Script -->
    <script src="chatbox-pop.js"></script>
</body>
</html>

2. React (JSX) Integration

Use this in standard React projects.

Installation

  1. Move ChatWidget.jsx and chatbox-pop.css into your src/components/ directory.
  2. Ensure axios is installed: npm install axios.

Usage

import ChatWidget from './components/ChatWidget';

function App() {
  const config = {
    title: 'Customer Support',
    welcomeMessage: 'How can we assist you today?',
    theme: {
        primary: '#4f46e5',
        userBubble: '#4f46e5'
    }
  };

  return (
    <div>
      <h1>My Website</h1>
      <ChatWidget config={config} />
    </div>
  );
}

3. React (TSX) Integration

Best for TypeScript-based React projects for full type safety.

Installation

  1. Move ChatWidget.tsx and chatbox-pop.css into your src/components/ directory.
  2. Install dependencies: npm install axios.

Usage

import ChatWidget from './components/ChatWidget';

const config = {
  title: 'Support',
  theme: {
    primary: '#0ea5e9'
  }
};

const App = () => {
  return (
    <div className="app">
      <ChatWidget config={config} />
    </div>
  );
};

4. Configuration Options

The widget accepts a config object (or window.CHAT_WIDGET_CONFIG for HTML) with the following properties:

| Property | Type | Description | | :--- | :--- | :--- | | title | string | The main header title (e.g., "Support"). | | subtitle | string | The text below the title (e.g., "Online"). | | welcomeMessage| string | The first message shown by the bot. | | theme | object | Detailed styling options (see below). |

Theme Customization

You can control every aspect of the design via the theme object:

theme: {
    primary: '#4f46e5',      // Background of header/launcher
    headerText: '#ffffff',   // Text color in header
    bg: '#ffffff',           // Main window background
    userBubble: '#4f46e5',   // User message bubble color
    userText: '#ffffff',     // User message text color
    botBubble: '#f3f4f6',    // Bot message bubble color
    botText: '#1f2937',      // Bot message text color
    statusOnline: '#10b981'  // Color of the "Online" dot
}

5. API Integration

By default, the widget works in Simulated Mode (automatic random replies).

To connect a live API:

  1. Open the widget file (ChatWidget.tsx, ChatWidget.jsx, or chatbox-pop.js).
  2. Search for the // FUTURE API INTEGRATION comment.
  3. Uncomment the axios (or fetch) block and replace the placeholder URL with your backend endpoint.

React Example (Axios):

const response = await axios.post('your-api-url', {
    message: userMessage,
    sessionId: 'unique-id'
});
const botReply = response.data.reply;

6. Project Structure

  • public/plane_HTML/: Standalone version (JS/CSS/HTML).
  • src/ChatWidget.tsx / ChatWidget.jsx: React component versions.
  • src/chatbox-pop.css: Shared styling for the React widget.