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

@oichat/ui-react

v0.1.1

Published

OiChat React UI Components — Pre-built chat widgets for instant integration

Readme

@oichat/ui-react

Pre-built React chat UI components — drop-in room list, chat view, message bubbles, and more. Works with @oichat/sdk.

한국어 | English

Installation

npm install @oichat/ui-react @oichat/sdk
# or
yarn add @oichat/ui-react @oichat/sdk

Requirements: React 18+

Quick Start

import { OiChat } from "@oichat/sdk";
import { OiChatProvider, OiChatRoomList, OiChatView } from "@oichat/ui-react";
import "@oichat/ui-react/styles.css";

function App() {
  const [oichat] = useState(() => OiChat.init(config, { userId: "user-123" }));
  const [roomId, setRoomId] = useState<string | null>(null);

  return (
    <OiChatProvider client={oichat}>
      <OiChatRoomList onRoomSelect={(room) => setRoomId(room.room_id)} />
      {roomId && <OiChatView roomId={roomId} />}
    </OiChatProvider>
  );
}

Components

OiChatProvider

Wraps your app and provides SDK context to all child components.

<OiChatProvider client={oichat} theme={darkTheme} features={customFeatures}>
  {children}
</OiChatProvider>

OiChatRoomList

Paginated room list with unread badges and last message preview.

<OiChatRoomList onRoomSelect={(room) => setRoomId(room.room_id)} />

OiChatView

Full chat screen with real-time messaging, read receipts, and typing indicators.

<OiChatView roomId="room-abc" onBack={() => setRoomId(null)} />

OiMessageBubble

Individual message bubble supporting text, image, file, and system messages.

<OiMessageBubble message={message} isMine={true} />

OiMessageInput

Message input with file/image attachment support.

<OiMessageInput roomId="room-abc" />

Theming

import { lightTheme, darkTheme, mergeTheme } from "@oichat/ui-react";

// Built-in themes
<OiChatProvider theme={darkTheme}>

// Custom theme
const customTheme = mergeTheme(lightTheme, {
  colors: {
    primary: "#6366f1",
    bubbleMine: "#e0e7ff",
  },
});

Feature Toggles

import { defaultFeatures, mergeFeatures } from "@oichat/ui-react";

const features = mergeFeatures(defaultFeatures, {
  typing: true,
  readReceipt: true,
  fileUpload: true,
  imageUpload: true,
  messageEdit: true,
  messageDelete: true,
});

<OiChatProvider features={features}>

Modals & Overlays

import {
  OiActionSheet,
  OiConfirmModal,
  OiEditModal,
  OiRenameModal,
  OiParticipantsModal,
  OiImageViewer,
  OiAttachMenu,
} from "@oichat/ui-react";

Hooks

import {
  useOiChat,
  useConnection,
  useRooms,
  useMessages,
} from "@oichat/ui-react";

// Access SDK instance
const { client } = useOiChat();

// Connection state
const { state, isConnected } = useConnection();

// Room list with pagination
const { rooms, loadMore, hasMore } = useRooms();

// Messages for a room
const { messages, send, loadMore } = useMessages(roomId);

Links


한국어

즉시 사용 가능한 React 채팅 UI 컴포넌트 — 채팅방 목록, 채팅 화면, 메시지 버블 등. @oichat/sdk와 함께 사용합니다.

설치

npm install @oichat/ui-react @oichat/sdk
# 또는
yarn add @oichat/ui-react @oichat/sdk

요구사항: React 18+

빠른 시작

import { OiChat } from "@oichat/sdk";
import { OiChatProvider, OiChatRoomList, OiChatView } from "@oichat/ui-react";
import "@oichat/ui-react/styles.css";

function App() {
  const [oichat] = useState(() => OiChat.init(config, { userId: "user-123" }));
  const [roomId, setRoomId] = useState<string | null>(null);

  return (
    <OiChatProvider client={oichat}>
      <OiChatRoomList onRoomSelect={(room) => setRoomId(room.room_id)} />
      {roomId && <OiChatView roomId={roomId} />}
    </OiChatProvider>
  );
}

제공 컴포넌트

| 컴포넌트 | 설명 | | ----------------------- | ------------------------------------------ | | OiChatProvider | SDK 컨텍스트 제공, 테마/기능 설정 | | OiChatRoomList | 채팅방 목록 (페이지네이션, 안읽은 수 뱃지) | | OiChatView | 채팅 화면 (실시간 메시징, 읽음 확인) | | OiMessageBubble | 메시지 버블 (텍스트, 이미지, 파일, 시스템) | | OiMessageInput | 메시지 입력 (파일/이미지 첨부) | | OiTypingIndicator | 타이핑 표시기 | | OiConnectionIndicator | 연결 상태 표시 | | OiAvatar | 사용자 아바타 |

테마 지원

  • lightTheme / darkTheme 기본 제공
  • mergeTheme()으로 커스텀 테마 생성
  • 11개 기능 토글 (typing, readReceipt, fileUpload 등)

관련 링크

License

MIT