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

chat-widget-demo

v1.0.5

Published

AI Chat Widget - A floating chat assistant with mobile verification and streaming responses

Readme

AI Chat Bot Plugin 🤖

A customizable React chat widget with mobile verification and streaming AI responses. Perfect for adding AI-powered chat functionality to any website.

✨ Features

  • 📱 Mobile/Email verification with OTP (80+ country codes)
  • 💬 Real-time streaming responses (like ChatGPT/DeepSeek)
  • 🎨 Fully customizable theme colors and text
  • 📦 Easy NPM package integration
  • ⚛️ Built with React + TypeScript
  • 🚀 Lightweight and performant
  • 📍 Flexible positioning (bottom-right/left)
  • 🔐 Custom headers support for authentication
  • 🎙️ Voice input with multiple English variants
  • 🗂️ Conversation history management

📦 Installation

# npm
npm install @shiftboolean/ai-chat-widget

# yarn
yarn add @shiftboolean/ai-chat-widget

# pnpm
pnpm add @shiftboolean/ai-chat-widget

# bun
bun add @shiftboolean/ai-chat-widget

🚀 Quick Start

import { ChatWidget } from "@shiftboolean/ai-chat-widget";

function App() {
  return (
    <ChatWidget
      primaryColor="#6366f1"
      title="AI Assistant"
      subtitle="How can I help you?"
      placeholder="Type a message..."
      welcomeMessage="Hello! How can I help?"
      requireMobileVerification={true}
      requireEmailVerification={true}
      position="bottom-right"
      zIndex={9999}
    />
  );
}

⚙️ Props

| Prop | Type | Default | Description | | --------------------------- | ------------------------------------------------- | -------------------------------------- | ------------------------------------------------- | | position | 'bottom-right' \| 'bottom-left' | 'bottom-right' | Where the widget appears on screen | | primaryColor | string | '#6366f1' | Main color for buttons and accents | | title | string | 'AI Assistant' | Header text displayed in the widget | | subtitle | string | 'How can I help you today?' | Subheading text below the title | | placeholder | string | 'Type your message...' | Hint text in the message input field | | welcomeMessage | string | 'Hello! I'm your AI assistant...' | First message shown from the AI | | chatIcon | React.ReactNode | Built-in icon | Custom icon for the chat button | | WidgetToggleButton | React.ReactElement | - | Custom button to open/close chat | | requireMobileVerification | boolean | true | Enable phone number OTP verification | | requireEmailVerification | boolean | true | Enable email OTP verification | | headers | Record<string, string> | {} | Additional HTTP headers for API requests | | onOpen | () => void | - | Function called when chat opens | | onClose | () => void | - | Function called when chat closes | | onMessageSent | (message: string) => void | - | Function called when user sends a message | | onMessageReceived | (message: string) => void | - | Function called when AI responds | | onOtpVerified | (verifiedWith: string) => void | - | Function called after successful OTP verification | | onOtpSent | () => void | - | Function called when OTP is sent | | onLogout | () => void | - | Function called when user logs out | | className | string | - | CSS class name for custom styling | | zIndex | number | 9999 | Stacking order of the widget | | voiceChat | { enabled: boolean; language: EnglishLanguage } | { enabled: true, language: 'en-US' } | Voice input configuration and language | | theme | 'light' \| 'dark' | 'dark' | Visual theme (light or dark mode) | | userEmail | string | - | Pre-filled email for trusted login | | userPhone | string | - | Pre-filled phone for trusted login | | style | React.CSSProperties | - | Inline CSS styles for custom appearance |

Voice Chat Languages

Supported English language variants for voice input: en-US | en-GB | en-AU | en-CA | en-IN | en-NZ | en-ZA | en-IE | en-SG

🎨 Usage Examples

Basic Usage with Email & Phone Verification

<ChatWidget requireMobileVerification={true} requireEmailVerification={true} />

Skip Verification (Direct Chat)

<ChatWidget
  requireMobileVerification={false}
  requireEmailVerification={false}
/>

Pre-authenticated User (Trusted Login)

<ChatWidget userEmail="[email protected]" userPhone="+919999999999" />

Custom Theme and Colors

<ChatWidget
  primaryColor="#10b981"
  theme="light"
  title="Support Bot"
  subtitle="We're here to help!"
/>

Custom Toggle Button

<ChatWidget
  WidgetToggleButton={<button style={{ padding: 10 }}>Chat with us</button>}
/>

Voice Input Configuration

<ChatWidget
  voiceChat={{
    enabled: true,
    language: "en-GB", // UK English
  }}
/>

With Custom Styling

<ChatWidget
  className="my-custom-widget"
  style={{ fontFamily: "ui-monospace" }}
  zIndex={10000}
/>

With Event Callbacks

<ChatWidget
  onOpen={() => }
  onClose={() => }
  onMessageSent={(msg) => }
  onMessageReceived={(msg) => }
  onOtpVerified={(verifiedWith) => }
  onOtpSent={() => }
  onLogout={() => }
/>

📄 License

MIT © ShiftBoolean


Made with ❤️ by ShiftBoolean