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

simba-chat

v0.1.0

Published

Embeddable chat widget for Simba RAG applications

Readme

simba-chat

Embeddable chat widget for Simba RAG applications.

Installation

npm install simba-chat
# or
bun add simba-chat
# or
pnpm add simba-chat

Usage

Inline Chat

import { SimbaChat } from 'simba-chat';
import 'simba-chat/styles.css';

function App() {
  return (
    <SimbaChat
      apiUrl="https://your-simba-api.com"
      organizationId="your-organization-id"
      apiKey="your-api-key"
      collection="my-docs"
      placeholder="Ask me anything..."
      onError={(error) => console.error(error)}
      onMessage={(message) => console.log('New message:', message)}
    />
  );
}

Floating Bubble

import { SimbaChatBubble } from 'simba-chat';
import 'simba-chat/styles.css';

function App() {
  return (
    <SimbaChatBubble
      apiUrl="https://your-simba-api.com"
      organizationId="your-organization-id"
      apiKey="your-api-key"
      position="bottom-right"
      defaultOpen={false}
    />
  );
}

Custom UI with Hook

import { useSimbaChat } from 'simba-chat';

function CustomChat() {
  const { messages, status, sendMessage, stop, clear } = useSimbaChat({
    apiUrl: 'https://your-simba-api.com',
    organizationId: 'your-organization-id',
    apiKey: 'your-api-key',
    collection: 'my-docs',
  });

  return (
    <div>
      {messages.map((msg) => (
        <div key={msg.id}>
          <strong>{msg.role}:</strong> {msg.content}
        </div>
      ))}
      <button onClick={() => sendMessage('Hello!')}>Send</button>
      {status === 'streaming' && <button onClick={stop}>Stop</button>}
      <button onClick={clear}>Clear</button>
    </div>
  );
}

Props

SimbaChat

| Prop | Type | Required | Description | |------|------|----------|-------------| | apiUrl | string | Yes | Simba API base URL | | organizationId | string | Yes | Organization ID for multi-tenant requests | | apiKey | string | No | API key for authentication | | collection | string | No | Collection name for RAG queries | | placeholder | string | No | Input placeholder text | | className | string | No | Additional CSS class | | style | CSSProperties | No | Inline styles | | onError | (error: Error) => void | No | Error callback | | onMessage | (message: ChatMessage) => void | No | New message callback |

SimbaChatBubble

Extends all SimbaChat props, plus:

| Prop | Type | Default | Description | |------|------|---------|-------------| | position | 'bottom-right' \| 'bottom-left' | 'bottom-right' | Bubble position | | bubbleIcon | ReactNode | Chat icon | Custom bubble icon | | defaultOpen | boolean | false | Start with chat open |

Theming

Customize the appearance using CSS variables:

:root {
  --simba-primary: #8b5cf6;
  --simba-primary-foreground: #ffffff;
  --simba-background: #ffffff;
  --simba-foreground: #0f172a;
  --simba-muted: #f1f5f9;
  --simba-muted-foreground: #64748b;
  --simba-border: #e2e8f0;
  --simba-radius: 0.5rem;
}

License

MIT