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

@verbox/react

v1.1.0

Published

Official Verbox AI Chat Widget for React & Next.js - Typing animation, image upload, feedback, theming

Readme

@verbox/react

Official Verbox AI Chat Widget for React & Next.js.

A fully-featured, production-ready embeddable chat widget with typing animation, image upload, feedback, theming, and more.

Installation

npm install @verbox/react
# or
yarn add @verbox/react
# or
pnpm add @verbox/react

Quick Start

import { VerboxWidget } from "@verbox/react";

function App() {
  return <VerboxWidget botId="your-bot-id" />;
}

That's it. The widget connects to https://api.verbox.app by default. No API key needed.

Features

  • Typing Animation - Word-by-word text reveal with blinking cursor (like ChatGPT)
  • Image Upload - Click to attach images (up to 5 per message)
  • Feedback - Thumbs up/down on bot responses
  • Dark/Light Themes - Built-in themes with full customization
  • Chat History - Persistent sessions via localStorage
  • Suggested Questions - Configurable chips and follow-up suggestions
  • Markdown - Bold, italic, code blocks, links rendered in messages
  • Responsive - Full-screen on mobile, floating window on desktop
  • Headless Mode - Use hooks directly for fully custom UIs

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | botId | string | required | Your Verbox bot ID | | baseUrl | string | "https://api.verbox.app" | Verbox API URL (rarely needed) | | theme | "light" \| "dark" | "light" | Color theme | | primaryColor | string | "#685AFF" | Accent color | | position | string | "bottom-right" | Widget position | | headerTitle | string | "Verbox" | Header title | | welcomeMessage | string | "Hi! How can I help you today?" | Welcome message | | inputPlaceholder | string | "Type your message..." | Input placeholder | | avatarUrl | string | - | Custom bot avatar URL | | borderRadius | number | 16 | Window border radius | | showBranding | boolean | true | Show "Powered by Verbox" | | enableImageUpload | boolean | true | Enable image attachments | | enableFeedback | boolean | true | Enable feedback buttons | | enableHistory | boolean | true | Enable session persistence | | suggestedQuestions | string[] | [] | Initial suggested questions | | typingAnimation | boolean | true | Enable typing animation | | typingSpeed | number | 30 | Typing animation speed (ms per word) | | zIndex | number | 9999 | z-index for widget elements |

Event Callbacks

<VerboxWidget
  botId="your-bot-id"
  onOpen={() => console.log("Widget opened")}
  onClose={() => console.log("Widget closed")}
  onMessageSent={(msg) => console.log("User sent:", msg)}
  onMessageReceived={(msg) => console.log("Bot replied:", msg)}
  onError={(err) => console.error("Error:", err)}
/>

Headless Mode (Custom UI)

Use the VerboxProvider and useVerbox hook to build a completely custom chat interface:

import { VerboxProvider, useVerbox } from "@verbox/react";

function CustomChat() {
  const {
    messages,
    isLoading,
    suggestedFollowUps,
    sendMessage,
    submitFeedback,
    clearHistory,
  } = useVerbox();

  return (
    <div>
      {messages.map((msg) => (
        <div key={msg.id}>
          <strong>{msg.role}:</strong> {msg.content}
        </div>
      ))}
      {isLoading && <div>Typing...</div>}
    </div>
  );
}

function App() {
  return (
    <VerboxProvider botId="your-bot-id">
      <CustomChat />
    </VerboxProvider>
  );
}

Using Individual Hooks

useVerboxChat

Low-level hook for chat state management:

import { useVerboxChat } from "@verbox/react";

function MyChat() {
  const chat = useVerboxChat({
    botId: "your-bot-id",
  });

  return (
    <div>
      <div>{chat.messages.map(/* render */)}</div>
      <button onClick={() => chat.sendMessage("Hello!")}>Send</button>
    </div>
  );
}

useTypingAnimation

Standalone typing animation hook for any text:

import { useTypingAnimation } from "@verbox/react";

function TypedText() {
  const { displayedText, isAnimating, animate } = useTypingAnimation({
    speed: 30,
    enabled: true,
  });

  return (
    <div>
      <p>{displayedText}{isAnimating && <span className="cursor">|</span>}</p>
      <button onClick={() => animate("Hello, this text will type out word by word!")}>
        Start
      </button>
    </div>
  );
}

Next.js Usage

Since the widget uses browser APIs, wrap it with dynamic import in Next.js:

import dynamic from "next/dynamic";

const VerboxWidget = dynamic(
  () => import("@verbox/react").then((mod) => mod.VerboxWidget),
  { ssr: false }
);

export default function Layout({ children }) {
  return (
    <>
      {children}
      <VerboxWidget botId="your-bot-id" theme="dark" />
    </>
  );
}

Or use the "use client" directive:

"use client";
import { VerboxWidget } from "@verbox/react";

export function ChatWidget() {
  return <VerboxWidget botId="your-bot-id" />;
}

License

MIT