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

@sama-communications/ui-kit

v1.0.0

Published

A UI component library for building SAMA chat interfaces in Web applications.

Readme

SAMA UI KIT

A UI component library for building SAMA chat interfaces in Web applications.

Primitives provide the visual building blocks, composables assemble them into full UI sections, and adapters wire them to your backend and state without tying the UI-kit to a specific client. The library includes reusable React components (avatars, typing indicators, video/image views, scrollbars, loaders, and more) optimized for chat UIs.

Architecture

The UI-kit is organized into three layers: primitive components, composables, and adapters.

Primitive components (elements)

Low-level UI building blocks with minimal logic. They receive data via props and are responsible for rendering and accessibility.

  • Examples: UserAvatar, TypingLine, VideoView, ImageView, Modal, DotsLoader, OvalLoader, TextAreaInput, SearchInput, SocketConnectingLine, MessageStatus, InformativeMessage, and others.
  • Located in src/components/elements/.
  • Some primitives may use adapters for formatting (e.g. user names, timestamps); others rely only on props.

Composables (composites)

Higher-level components built from primitives and other elements. They implement ready-made UI blocks (chat header, conversation list, search, profile, etc.) and typically use adapters to access data and trigger actions.

  • Examples: ConversationHeader, ConversationInput, ConversationItemList, SearchBlock, EditModalContainer, UserProfile, ChatMessage, AttachModal, ContextMenu, and others.
  • Located in src/components/composites/.
  • Composables call getAdapters() and use adapter hooks and utilities (participants, conversations, messages, context menu, formatting).

Adapters

Adapters provide dependency injection: the UI-kit does not depend on a specific client (SAMA or otherwise). The application configures adapters once via setAdapters(); components obtain them via getAdapters().

  • What is provided: hooks (useParticipants, useConversations, useMessages, useDrafts, useContextMenu) and utilities (userUtils, conversationUtils, mediaUtils, formatedUtils). Optionally, getSearchBlockData for SearchBlock.
  • Where it’s defined: types in src/adapters/types.ts, default implementations in src/adapters/defaults.ts, registration via setAdapters / getAdapters in src/adapters/manager.ts.
  • How to use: at application startup, call setAdapters({ useParticipants: () => {...}, userUtils: {...}, ... }) with your implementations; UI-kit components call getAdapters() internally.

API documentation

...

Installation

npm install @sama-communications/ui-kit

Usage

import { TypingLine, UserAvatar, VideoView } from "@sama-communications/ui-kit";

function ChatExample() {
  return (
    <div>
      <TypingLine userIds={["user1", "user2"]} />
      <UserAvatar avatarUrl="https://example.com/avatar.jpg" />
      <VideoView video={{ file_url: "https://example.com/video.mp4" }} />
    </div>
  );
}

Have an issue?

Join our Discord for quick answers to your questions or write your question in the issues tab

Community and support

Join our community for support and discussions:

License

Apache 2.0

Changelog

CHANGELOG