Skip to content
PluginStats

@21st-sdk/react weekly downloads statistics

By 21st-sdk (2 listings) · npm · AI SDKs

React components for 21st Agents chat UIs

View on npm Outdated · Nov 4, 2026

@21st-sdk/react has 1,392 recorded weekly downloads on npm, an increase of 214% over the past 30 days, ranking #1984 of 3,247 tracked listings.

Weekly downloads
1,392
Official API · Dec 5, 2026
7-day growth
+189%
+911 weekly downloads
30-day growth
+214%
+949 weekly downloads
90-day growth
+76.9%
+605 weekly downloads
Rank
#1984
▲ 187 in 7 days

About @21st-sdk/react

@21st-sdk/react

React components for building AI agent chat UIs powered by 21st Agents. Drop-in chat interface with tool renderers, theming, and full customization.

Built on Vercel AI SDK v5 — no custom hooks or state management. Just components.

Install

npm install @21st-sdk/react ai @ai-sdk/react

Quick Start

"use client";

import { useChat } from "@ai-sdk/react";
import { AgentChat, createAgentChat } from "@21st-sdk/react";
import "@21st-sdk/react/styles.css";
import { useMemo } from "react";

export default function Chat() {
  const chat = useMemo(
    () =>
      createAgentChat({
        agent: "your-agent-slug",
        getToken: async () => "your_an_sk_token",
      }),
    [],
  );

  const { messages, sendMessage, status, stop, error } = useChat({ chat });

  return (
    <AgentChat
      messages={messages}
      onSend={(msg) =>
        sendMessage({
          parts: [{ type: "text", text: msg.content }],
        })
      }
      status={status}
      onStop={stop}
      error={error}
    />
  );
}

That's it. You get a full chat UI with message rendering, tool visualization, auto-scroll, and streaming — all wired to your deployed agent.

Customization

Four levels of customization, from simple to full control:

1. Theme tokens

Apply a theme JSON from the Playground:

<AgentChat theme={playgroundTheme} colorMode="dark" />
2. Class overrides

Override styles per element:

<AgentChat
  classNames={{
    root: "rounded-2xl border",
    messageList: "px-8",
    inputBar: "bg-gray-50",
    userMessage: "bg-blue-100",
  }}
/>
3. Slot components

Swap sub-components entirely:

<AgentChat
  slots={{
    InputBar: MyCustomInput,
    UserMessage: MyUserBubble,
    ToolRenderer: MyToolRenderer,
  }}
/>
4. Individual components

Build from scratch with individual imports:

import { MessageList, InputBar, ToolRenderer } from "@21st-sdk/react";

CSS

Import the stylesheet once in your app:

import "@21st-sdk/react/styles.css";

No Tailwind peer dependency required — CSS is pre-compiled. All elements have stable an-* class names for custom styling:

.an-root { }
.an-message-list { }
.an-user-message { }
.an-assistant-message { }
.an-input-bar { }
.an-send-button { }
.an-tool-bash { }
.an-tool-edit { }
/* ... */

API Reference

createAgentChat(options)

Creates an AI SDK Chat instance pointed at the relay API.

createAgentChat({
  agent: string;           // Agent slug from your dashboard
  getToken: () => Promise<string>;  // Returns your an_sk_ API key
  apiUrl?: string;         // Default: "https://relay.an.dev"
  projectId?: string;      // Session persistence key
  onFinish?: () => void;
  onError?: (error: Error) => void;
})

Returns a standard Chat<UIMessage> — pass it to useChat({ chat }).

<AgentChat />

Drop-in chat component.

PropTypeDescription
messagesUIMessage[]From useChat()
onSend(msg) => voidSend handler
statusChatStatus"ready" | "submitted" | "streaming" | "error"
onStop() => voidStop generation
errorErrorError to display
themeChatThemeTheme from playground
colorMode"light" | "dark" | "auto"Color mode
classNamesPartial<ChatClassNames>Per-element CSS overrides
slotsPartial<ChatSlots>Component swapping
classNamestringRoot element class
styleCSSPropertiesRoot element style
modelSelector{ models, activeModelId?, onModelChange? }Model picker (for custom backends)
attachments{ onAttach?, images?, files? }File attachment support
applyTheme(element, theme, colorMode?)

Manually inject CSS variables from a playground theme JSON.

Components
ComponentDescription
MessageListAuto-scrolling message container with grouping
UserMessageUser message bubble
AssistantMessageAssistant response with parts routing
StreamingMarkdownMarkdown renderer with syntax highlighting
InputBarText input with send/stop buttons
MessageActionsCopy button
ToolRendererRoutes tool parts to the correct component
Tool Components
ComponentRenders
BashToolTerminal commands with output
EditToolFile edits with diff display
WriteToolFile creation
SearchToolWeb search results
TodoToolTask checklists
PlanToolStep-by-step plans
TaskToolSub-agent tasks
McpToolMCP protocol calls
ThinkingToolReasoning/thinking indicator
GenericToolFallback for unknown tools

Theme Type

interface ChatTheme {
  theme: Record<string, string>;  // Shared: font, spacing, accent
  light: Record<string, string>;  // Light mode CSS vars
  dark: Record<string, string>;   // Dark mode CSS vars
}

Model Selection

The SDK exports pre-defined model constants for convenience:

import { CLAUDE_MODELS, DEFAULT_MODEL_ID } from "@21st-sdk/react"
import type { ModelOption, ClaudeModelId } from "@21st-sdk/react"

Note: When using createAgentChat() with the relay, the model is set server-side in the agent config. The modelSelector prop is for building UIs with custom backends.

License

MIT

Description from the npm listing.

  • react
  • ai
  • agent
  • chat
  • ai-sdk
  • 21st
  • 21st.dev
  • components
  • ui

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

@21st-sdk/react weekly downloads on npm, last 90 days: 1,392 weekly downloads as of Dec 5, 2026, +76.9% over 90 days.@21st-sdk/reactWeekly downloads on npm · Last 90 days1,392downloads / week+76.9% over 90 days02004006008001K1.2K1.4K1.6KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
@21st-sdk/react weekly downloads on npm, last 90 days: 1,392 weekly downloads as of Dec 5, 2026, +76.9% over 90 days.

7/30/90-day growth

@21st-sdk/react weekly downloads growth on npm: +189% over 7 days, +214% over 30 days, +76.9% over 90 days.@21st-sdk/reactWeekly downloads growth on npm1,392downloads / week now7-day growth+911 weekly downloads+189%30-day growth+949 weekly downloads+214%90-day growth+605 weekly downloads+76.9%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
@21st-sdk/react weekly downloads growth on npm: +189% over 7 days, +214% over 30 days, +76.9% over 90 days.

Ranking history

@21st-sdk/react npm ranking history: currently #1984 (by weekly downloads).@21st-sdk/reactnpm ranking · by weekly downloads · Last 90 days#1984current rank#1500#1600#1700#1800#1900#2000#2100#2200Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 24 observations · Updated Dec 5, 2026pluginstats.com
@21st-sdk/react npm ranking history: currently #1984 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 100, #4 (overall #1,984)
All npm: every listing in weekly downloads order

Listing placement

AI SDKs378 listings · 19 pages · page 11, #3 (overall #203)
AI SDKs: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (170)
Recent weekly downloads observations for @21st-sdk/react
Date (UTC)Weekly downloadsChange vs. previous
1,392-28
1,420+111
1,309+292
1,017+485
532+85
447-31
478-3
481-104
585-25
610-10
620-15
635-32
667-3
670—

Similar npm AI SDKs plugins

All 20 @21st-sdk/react alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/@21st-sdk/react. First seen Oct 16, 2026; last successful collection Nov 4, 2026. See the methodology.