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

@sonex/sdk-browser

v0.1.1

Published

React chatbot widget component for Sonex SDK - customizable, embeddable AI chat interface

Readme

@sonex/sdk-browser

React chatbot widget component for Sonex SDK - customizable, embeddable AI chat interface.

Features

  • 🎨 Fully customizable UI with 6+ predefined themes
  • 🎤 Voice input support with real-time transcription
  • 💬 Real-time chat messaging with streaming responses
  • 📱 Responsive design (mobile & desktop)
  • 🔧 Easy configuration with TypeScript support
  • 🎯 Custom template system for rich message rendering
  • 🔐 Flexible token management (providers, storage adapters)

Installation

npm install @sonex/sdk-browser

Note: This package includes @sonex/sdk-core as a dependency - you don't need to install it separately.

Peer Dependencies

This package requires React 16.8+ as a peer dependency:

npm install react react-dom

Quick Start

import { SonexWidget, WidgetConfig } from '@sonex/sdk-browser';

function App() {
  const config: WidgetConfig = {
    chatbotConfig: {
      apiEndpoint: 'https://your-api.com/transcribe',
      sessionEndpoint: 'https://your-api.com/session',
      authTokenProvider: {
        getAuthToken: () => localStorage.getItem('auth_token'),
      },
    },
    widgetTitle: 'My Assistant',
    widgetSubtitle: 'How can I help you?',
    position: 'bottom-right',
    theme: {
      primaryColor: '#007bff',
      headerBackground: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
    },
  };

  return <SonexWidget config={config} />;
}

Configuration Options

WidgetConfig

| Property | Type | Description | |----------|------|-------------| | chatbotConfig | ChatbotConfig | Required. Core chatbot configuration | | widgetTitle | string | Title displayed in widget header | | widgetSubtitle | string | Subtitle displayed in widget header | | position | 'bottom-right' \| 'bottom-left' | Widget position | | theme | Partial<SonexTheme> | Custom theme options | | enableVoice | boolean | Enable voice input (default: true) | | placeholder | string | Input placeholder text | | templates | TemplateDefinition[] | Custom message templates |

ChatbotConfig

| Property | Type | Description | |----------|------|-------------| | apiEndpoint | string | Required. URL for chat API | | sessionEndpoint | string | URL for session token endpoint | | authTokenProvider | AuthTokenProvider | Provider for auth token (session API) | | tokenProvider | TokenProvider | Provider for Sonex session token | | storage | StorageConfig | Token storage strategy |

Predefined Themes

import { SonexWidget, getTheme } from '@sonex/sdk-browser';

// Available themes: 'light', 'dark', 'professional-blue',
// 'friendly-green', 'modern-purple', 'minimal'
const config: WidgetConfig = {
  chatbotConfig: { apiEndpoint: '...' },
  theme: getTheme('dark'),
};

Custom Templates

Render custom UI for specific message types:

const config: WidgetConfig = {
  chatbotConfig: { apiEndpoint: '...' },
  templates: [
    {
      name: 'expense-card',
      matcher: (data) => data?.parameters?.amount !== undefined,
      component: ExpenseCardTemplate,
    },
  ],
};

Documentation

For comprehensive documentation, see the Integration Guide.

Related Packages

  • @sonex/sdk-core - Core services (included as dependency)
  • @sonex/sdk-node - Server-side utilities

License

MIT