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

@assistant-ui/react-streamdown

v0.3.17

Published

Streamdown-based markdown rendering for assistant-ui

Readme

@assistant-ui/react-streamdown

Streamdown-based markdown rendering for @assistant-ui/react. Drop-in replacement for @assistant-ui/react-markdown with built-in Shiki, KaTeX, and Mermaid support, optimized for AI streaming output.

When to use this

| Package | Best for | | ---------------------------------------- | ----------------------------------------------------------------- | | @assistant-ui/react-markdown | Lightweight rendering; bring your own syntax highlighter. | | @assistant-ui/react-streamdown | Feature-rich with built-in Shiki, KaTeX, and Mermaid. | | @assistant-ui/react-syntax-highlighter | Pair with react-markdown when you only need code-block highlighting. |

Installation

npm install @assistant-ui/react @assistant-ui/react-streamdown

For optional features:

npm install @streamdown/code @streamdown/math @streamdown/mermaid @streamdown/cjk

CSS setup

Streamdown ships its control buttons (code-block toolbar, mermaid fullscreen) and the streaming caret as Tailwind utility classes. Tailwind v4 does not scan node_modules by default, so add a @source directive for Streamdown (and one per installed plugin) to the same stylesheet that imports Tailwind:

@import "tailwindcss";

@source "../node_modules/streamdown/dist/*.js";
@source "../node_modules/@streamdown/code/dist/*.js";
@source "../node_modules/@streamdown/math/dist/*.js";
@source "../node_modules/@streamdown/mermaid/dist/*.js";
@source "../node_modules/@streamdown/cjk/dist/*.js";

Adjust the relative path to your project's node_modules. In a pnpm or Turbo monorepo with hoisted dependencies, you typically need more ../ segments to reach the workspace root. Only keep the plugin lines for packages you actually installed.

Without these directives, the copy, download, and fullscreen buttons render unstyled, and the caret indicator stays invisible.

If you use the animated prop or createAnimatePlugin for word-level fade-in, also import the keyframes once at your app entry:

import "streamdown/styles.css";

For details on the shadcn/ui design tokens Streamdown expects, see the Streamdown README.

Usage

import { StreamdownTextPrimitive } from "@assistant-ui/react-streamdown";
import { code } from "@streamdown/code";
import { math } from "@streamdown/math";
import { mermaid } from "@streamdown/mermaid";
import "katex/dist/katex.min.css";

export const MarkdownText = () => (
  <StreamdownTextPrimitive
    plugins={{ code, math, mermaid }}
    shikiTheme={["github-light", "github-dark"]}
  />
);

Full prop reference, plugin docs, performance guide, and react-markdown migration notes at assistant-ui.com/docs/guides/streamdown.