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

scrapper-chat-bot

v1.0.1

Published

A customizable React chatbot widget with voice support

Downloads

8

Readme

Scrapper Chat Bot

A customizable React chatbot widget with voice support, modern UI, and seamless backend integration. Perfect for adding AI-powered chat functionality to any React application.

Features

  • 🎨 Fully Customizable - Colors, position, size, and styling
  • 🎤 Voice Support - Built-in speech recognition and text-to-speech
  • 📱 Responsive Design - Works on desktop and mobile devices
  • 🔧 Easy Integration - Plug and play with any React app
  • 🎯 Session Management - Automatic session handling with UUID
  • 💬 Real-time Chat - Smooth messaging experience with typing indicators
  • 🌐 Backend Ready - Pre-configured for API integration
  • Modern UI - Beautiful gradients and animations

Installation

npm install scrapper-chat-bot

Quick Start

import React from "react";
import ChatbotWidget from "scrapper-chat-bot";

function App() {
  return (
    <div>
      <h1>My App</h1>
      <ChatbotWidget />
    </div>
  );
}

export default App;

Advanced Usage

import React from "react";
import ChatbotWidget from "scrapper-chat-bot";

function App() {
  return (
    <div>
      <ChatbotWidget
        primaryColor="#ff6b6b"
        accentColor="#4ecdc4"
        position="bottom-left"
        buttonSize="large"
        chatTitle="Customer Support"
        greeting="Hi there! How can I assist you today?"
        placeholder="Ask me anything..."
        maxHeight="500px"
        maxWidth="350px"
        logoUrl="https://example.com/logo.png"
      />
    </div>
  );
}

export default App;

Props

| Prop | Type | Default | Description | | -------------- | ------ | ------------------------------------ | ------------------------------------------------------------------------------- | | primaryColor | string | "#6366f1" | Primary color for the widget theme | | accentColor | string | "#8b5cf6" | Accent color used in gradients | | logoUrl | string | undefined | URL for custom logo in chat header | | position | string | "bottom-right" | Widget position: "bottom-right", "bottom-left", "top-right", "top-left" | | buttonSize | string | "medium" | Chat button size: "small", "medium", "large" | | chatTitle | string | "AI Assistant" | Title displayed in chat header | | placeholder | string | "Type your message..." | Input field placeholder text | | greeting | string | "Hello! How can I help you today?" | Initial bot message | | maxHeight | string | "600px" | Maximum height of chat window | | maxWidth | string | "400px" | Maximum width of chat window | | zIndex | number | 1000 | Z-index for widget positioning |

Voice Features

The chatbot includes advanced voice capabilities:

  • Speech Recognition: Click the microphone button to start voice input
  • Text-to-Speech: Bot responses can be spoken aloud in voice mode
  • Voice Mode: Full hands-free conversation experience
  • Smart Silence Detection: Automatically processes speech after pauses

Browser Support

Voice features require:

  • Modern browsers with Web Speech API support
  • HTTPS in production environments
  • Microphone permissions

Backend Integration

The component is pre-configured to work with a backend API. Update the backend URL in your component:

// In your backend integration
const response = await fetch("YOUR_BACKEND_URL/retrieve/", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    user_query: message,
    session_id: sessionId,
  }),
});

Expected API Response Format

{
  "response": "Bot response message",
  "session_id": "unique-session-id",
  "new_session_created": false
}

Styling and Theming

The component uses Tailwind CSS internally but doesn't require Tailwind to be installed in your project. All styles are self-contained.

Custom Styling Examples

// Dark theme
<ChatbotWidget
  primaryColor="#1f2937"
  accentColor="#374151"
/>

// Colorful theme
<ChatbotWidget
  primaryColor="#f59e0b"
  accentColor="#ef4444"
/>

// Corporate theme
<ChatbotWidget
  primaryColor="#1e40af"
  accentColor="#3b82f6"
/>

Session Management

The widget automatically:

  • Generates unique session IDs using UUID
  • Maintains conversation context
  • Handles session persistence across interactions
  • Manages new session creation via backend response

Error Handling

Built-in error handling for:

  • Network failures
  • API errors
  • Voice recognition issues
  • Browser compatibility problems

Accessibility

The component includes:

  • ARIA labels for screen readers
  • Keyboard navigation support
  • Focus management
  • High contrast support

Examples

Basic Implementation

import ChatbotWidget from "scrapper-chat-bot";

function CustomerSupport() {
  return (
    <ChatbotWidget
      chatTitle="Customer Support"
      greeting="Welcome! How can we help you today?"
    />
  );
}

E-commerce Integration

import ChatbotWidget from "scrapper-chat-bot";

function ProductPage() {
  return (
    <div>
      {/* Your product content */}
      <ChatbotWidget
        primaryColor="#10b981"
        accentColor="#059669"
        chatTitle="Shopping Assistant"
        greeting="Need help finding the perfect product?"
        placeholder="Ask about products, shipping, returns..."
      />
    </div>
  );
}

Multi-language Support

import ChatbotWidget from "scrapper-chat-bot";

function SpanishSupport() {
  return (
    <ChatbotWidget
      chatTitle="Asistente Virtual"
      greeting="¡Hola! ¿Cómo puedo ayudarte hoy?"
      placeholder="Escribe tu mensaje..."
    />
  );
}

Development

If you want to contribute or modify the component:

# Clone the repository
git clone https://github.com/your-username/scrapper-chat-bot.git

# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build

Browser Compatibility

  • Chrome 60+
  • Firefox 55+
  • Safari 14+
  • Edge 79+

Voice features require additional browser support for Web Speech API.

Troubleshooting

Common Issues

Voice not working:

  • Ensure HTTPS in production
  • Check microphone permissions
  • Verify browser Web Speech API support

Styling conflicts:

  • Component uses scoped Tailwind classes
  • No external CSS configuration needed
  • Custom themes via props

Backend connection issues:

  • Verify API endpoint URL
  • Check CORS configuration
  • Ensure proper request/response format

Getting Help

  1. Check the GitHub Issues
  2. Review the documentation
  3. Create a new issue with reproduction steps

License

MIT License - see LICENSE file for details.

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Changelog

v1.0.0

  • Initial release
  • Voice support
  • Session management
  • Customizable theming
  • Backend integration

Made with ❤️ for the React community