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

@ofi-summer-ai/mark-chatbot

v0.1.1

Published

Mark Chatbot component library — granular React chatbot UI components with SSE streaming support

Downloads

142

Readme

@ofi-summer-ai/mark-chatbot

A granular React chatbot UI component library. Every part of a chatbot — the bubble, the avatar, the input, the header — is its own independently importable component. Build only what you need, style it your way.

Features

  • 24 individual components — use any single one or compose them all
  • SSE streaming hook ready for mark-backend
  • Markdown rendering in assistant messages
  • Copy / thumbs-up / thumbs-down message actions
  • Auto-scroll to bottom as messages arrive
  • Floating "scroll to bottom" button
  • Typing indicator with animated dots
  • Online status indicator
  • localStorage chat history persistence hook
  • Full TypeScript types
  • Tailwind CSS 4 styling with dark-mode support
  • Zero framework lock-in — works with any React 18+ project

Installation

npm install @ofi-summer-ai/mark-chatbot
# or
pnpm add @ofi-summer-ai/mark-chatbot

Import the stylesheet once in your app entry point:

import '@ofi-summer-ai/mark-chatbot/style.css';

Quick Start

Option 1 — Drop-in chatbot (zero config)

import { ChatBot } from '@ofi-summer-ai/mark-chatbot';
import '@ofi-summer-ai/mark-chatbot/style.css';

export default function App() {
  return (
    <ChatBot
      config={{
        apiBaseUrl: 'https://api.example.com',
        authToken: 'Bearer your-token',
        campaignId: 'your-campaign-uuid',
        botName: 'Mark AI',
        botAvatar: '/bot-avatar.png',
        placeholder: 'Ask me about your campaign...',
      }}
      initialMessage="Hi! I'm Mark. How can I help with your marketing today?"
      height="600px"
    />
  );
}

Option 2 — Compose with ChatWindow

import { ChatWindow } from '@ofi-summer-ai/mark-chatbot/components';
import { useChatStream } from '@ofi-summer-ai/mark-chatbot/hooks';

const { messages, isLoading, sendMessage } = useChatStream({
  config: { apiBaseUrl: '...', campaignId: '...' },
});

<ChatWindow
  messages={messages}
  isLoading={isLoading}
  onSendMessage={sendMessage}
  headerProps={{ title: 'Mark AI', status: 'online' }}
  botAvatar="/bot.png"
  height="500px"
/>

Option 3 — Build your own from atoms

import {
  ChatBubble,
  ChatAvatar,
  ChatTimestamp,
  ChatMessageContent,
} from '@ofi-summer-ai/mark-chatbot/components';

<div className="flex gap-2">
  <ChatAvatar role="assistant" src="/bot.png" />
  <div>
    <ChatBubble variant="assistant">
      <ChatMessageContent content="**Hello!** How can I help?" />
    </ChatBubble>
    <ChatTimestamp timestamp={new Date().toISOString()} />
  </div>
</div>

Import Paths

| Import | What you get | |--------|-------------| | @ofi-summer-ai/mark-chatbot | Everything: types + hooks + components | | @ofi-summer-ai/mark-chatbot/components | All UI components only | | @ofi-summer-ai/mark-chatbot/hooks | All hooks only | | @ofi-summer-ai/mark-chatbot/style.css | Tailwind CSS stylesheet |


Component Overview

Layout

| Component | Description | |-----------|-------------| | ChatWindow | Full window: header + body + footer | | ChatHeader | Top bar with avatar, title, status, close button | | ChatBody | Scrollable messages area with auto-scroll | | ChatFooter | Input area wrapper |

Message

| Component | Description | |-----------|-------------| | ChatMessage | Complete message row (avatar + bubble + timestamp + actions) | | ChatBubble | The bubble shape — user / assistant / error variants | | ChatAvatar | Circular avatar with image or icon fallback | | ChatTimestamp | Formatted time display | | ChatMessageContent | Markdown-rendered message text | | ChatMessageActions | Copy / thumbs-up / thumbs-down row | | ChatMessageError | Error bubble with red styling | | ChatMessageSystem | Centered system / status pill |

Input

| Component | Description | |-----------|-------------| | ChatInput | Full input row: textarea + send button + hint | | ChatTextarea | Auto-growing textarea | | ChatSendButton | Send icon button with loading spinner | | ChatInputHint | Keyboard shortcut hint line |

Status / Feedback

| Component | Description | |-----------|-------------| | ChatTypingIndicator | Animated three-dot "Thinking..." indicator | | ChatOnlineIndicator | Online / offline / away status dot | | ChatScrollButton | Floating scroll-to-bottom button | | ChatEmptyState | Empty conversation placeholder | | ChatTokenCount | Token usage display |

All-in-One

| Component | Description | |-----------|-------------| | ChatBot | Drop-in complete chatbot with SSE streaming |


Hook Overview

| Hook | Description | |------|-------------| | useChat | Message array state management | | useChatStream | SSE streaming for mark-backend | | useAutoScroll | Auto-scroll ref to bottom of a list | | useChatHistory | localStorage chat history persistence |


Peer Dependencies

{
  "react": ">=18.0.0",
  "react-dom": ">=18.0.0"
}

License

MIT © OFI Summer AI