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

streamdown-prism

v2.1.1

Published

A minimal fork of streamdown using Prism instead of Shiki for syntax highlighting.

Readme

Streamdown-Prism

A minimal fork of streamdown that uses Prism instead of Shiki for code syntax highlighting.

npm version

Why This Fork?

The original streamdown package uses Shiki for syntax highlighting, which:

  • Requires async loading of language grammars
  • Has a larger bundle size due to TextMate grammars
  • Loads themes and languages from a CDN

This fork replaces Shiki with prism-react-renderer, providing:

  • Synchronous highlighting - No async loading, instant rendering
  • Smaller bundle - Prism's grammars are more lightweight
  • No CDN dependency - Everything is bundled locally
  • Simpler setup - No need to configure theme/language loading

Differences from Original

| Feature | streamdown (original) | streamdown-prism (this fork) | |---------|----------------------|------------------------------| | Highlighter | Shiki | Prism | | Loading | Async (CDN) | Sync (bundled) | | Languages | 100+ via CDN | ~30 built-in | | Themes | Many via CDN | github-light, github-dark, oneDark |

Not Included

This fork does not include the optional plugin packages from the original monorepo:

  • @streamdown/math - LaTeX/KaTeX rendering
  • @streamdown/cjk - CJK text support
  • @streamdown/mermaid - Mermaid diagrams (built-in mermaid support still works)

Installation

npm i streamdown-prism

Then, update your Tailwind globals.css to include the following:

@source "../node_modules/streamdown-prism/dist/*.js";

Make sure the path matches the location of the node_modules folder in your project.

Usage

import { useChat } from "@ai-sdk/react";
import { Streamdown, prism } from "streamdown-prism";

export default function Chat() {
  const { messages, status } = useChat();

  return (
    <div>
      {messages.map(message => (
        <div key={message.id}>
          {message.role === 'user' ? 'User: ' : 'AI: '}
          {message.parts.map((part, index) =>
            part.type === 'text' ? (
              <Streamdown
                key={index}
                plugins={{ code: prism }}
                isAnimating={status === 'streaming'}
              >
                {part.text}
              </Streamdown>
            ) : null,
          )}
        </div>
      ))}
    </div>
  );
}

Supported Languages

The built-in Prism plugin supports these languages:

  • javascript, typescript, jsx, tsx
  • python, java, go, rust, ruby, php, swift, kotlin, scala
  • c, cpp, csharp, objectivec
  • sql, bash/shell, json, yaml, xml, html, css
  • markdown, graphql, diff, r

Language aliases like js, ts, py, sh are also supported.

Custom Themes

import { createPrismPlugin } from "streamdown-prism";

const customPrism = createPrismPlugin({
  themes: ["github-light", "oneDark"], // [light theme, dark theme]
});

<Streamdown plugins={{ code: customPrism }}>
  {content}
</Streamdown>

Credits

This is a fork of streamdown by Vercel. All credit for the core streaming markdown functionality goes to the original authors.

License

Apache-2.0 (same as original)