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

@farihatang/llm-ui

v0.1.0-beta.1

Published

LLM UI component library for building AI chat interfaces.

Readme

@farihatang/llm-ui

A React component library for building AI chat interfaces — with real streaming support via the Anthropic API.

Built with React 19 · TypeScript · Tailwind CSS · Storybook 8

🔗 Storybook Demo · npm · GitHub


Components

| Component | Description | | ------------------- | ------------------------------------------------------------------ | | ChatWindow | Full chat interface — connects to Anthropic API with SSE streaming | | MessageBubble | User / AI message bubbles with Markdown rendering | | StreamingText | Typewriter effect for streaming token output | | PromptInput | Auto-growing textarea with send & stop controls | | ThinkingIndicator | Animated dots shown while the AI is generating | | FeedbackButtons | 👍👎 thumbs feedback with controlled & uncontrolled modes |


Installation

npm install @farihatang/llm-ui

Import the styles once at your app root:

import '@farihatang/llm-ui/styles';

Quick Start

Full chat with live Anthropic streaming

import { ChatWindow } from '@farihatang/llm-ui';
import '@farihatang/llm-ui/styles';

export default function App() {
  return (
    <ChatWindow
      apiKey={process.env.ANTHROPIC_API_KEY}
      model="claude-3-5-haiku-20241022"
      systemPrompt="You are a helpful assistant."
    />
  );
}

Compose individual components

import {
  MessageBubble,
  StreamingText,
  ThinkingIndicator,
  PromptInput,
  FeedbackButtons,
} from '@farihatang/llm-ui';

// A user message
<MessageBubble role="user" content="What is TypeScript?" />

// An AI message with Markdown
<MessageBubble
  role="assistant"
  content="TypeScript is a **typed superset** of JavaScript."
/>

// Streaming token output
<StreamingText text={streamedContent} speed={20} showCursor markdown />

// Loading state
<ThinkingIndicator size="md" label="Thinking…" />

// Smart input
<PromptInput
  onSubmit={(value) => sendMessage(value)}
  onStop={abortStream}
  isStreaming={isStreaming}
/>

// Feedback
<FeedbackButtons value={feedback} onChange={setFeedback} showLabel />

ChatWindow Props

| Prop | Type | Default | Description | | ----------------- | ----------- | -------------------------------- | ----------------------------- | | apiKey | string | — | Anthropic API key | | model | string | claude-3-5-haiku-20241022 | Model ID | | systemPrompt | string | 'You are a helpful assistant.' | System prompt | | initialMessages | Message[] | [] | Pre-load conversation history | | placeholder | string | 'Message AI…' | Input placeholder | | maxHeight | string | '520px' | Max height of message list | | className | string | — | Additional class names |


Development

npm install
npm run dev          # Storybook at localhost:6007
npm run build        # Build the library (tsup)
npm run build-storybook  # Build static Storybook
npm run type-check   # TypeScript check

Tech Stack

  • React 19 + TypeScript 5
  • Tailwind CSS 3 with custom design tokens
  • Storybook 8 with autodocs
  • tsup for dual CJS/ESM build
  • lucide-react for icons
  • react-markdown for Markdown rendering
  • Anthropic API — SSE streaming via fetch

License

MIT © Fariha Tang