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

@gridui/markdown

v2.0.1

Published

GridUI React Markdown content with streaming updates

Readme

@gridui/markdown

Render Markdown content using the existing GridUI theme. Import Markdown from @gridui/markdown; load @gridui/theme/styles.css before @gridui/markdown/styles.css. Consumers do not need a styling compiler.

import "@gridui/theme/styles.css";
import "@gridui/markdown/styles.css";
import { Markdown, type MarkdownStatus } from "@gridui/markdown";

const status: MarkdownStatus = "streaming";
<Markdown status={status}>{responseText}</Markdown>;

Styles

Load Theme once. Use @gridui/markdown/styled for automatic component CSS in CSS-aware bundlers, or keep the CSS-free root import and load @gridui/markdown/styles.css. Both entries expose the same root API. The standalone stylesheet includes component dependency styles; Theme/reset remain separate. See the integration guide for static HTML loading, SSR limits, and avoiding duplicate CSS.

Streaming snapshots

Pass the complete current text snapshot as children, not the latest token delta. The host decodes transport bytes, accumulates chunks, and supplies valid Unicode text. Replacements, shorter snapshots, and resets are accepted; the renderer does not append to hidden internal history.

| status | Presentation | | --- | --- | | pending | Waiting for content; busy without inventing placeholder text | | streaming | Busy, with presentation-only completion of unfinished syntax | | complete | Ordinary Markdown rendering of the exact supplied source | | interrupted | Retain partial formatting; no longer busy | | error | Retain partial formatting; no longer busy |

status defaults to complete. aria-busy reflects pending/streaming, and data-state exposes the resolved state. There is no per-token live region, animation queue, timer, or automatic scrolling. Render localized completion/error messages and retry controls outside the content.

While streaming, interrupted, or failed, remend completes partial emphasis and inline code for display. Unfinished links render as noninteractive text; unfinished images show alternative text without loading a partial URL. Existing CommonMark parsing handles open fenced code. GFM tables appear once the received source contains a valid header and separator; the renderer does not invent table columns or missing cell values. Other GFM features include task lists, strikethrough, and autolinks. Math rendering is not enabled.

Completion is a display heuristic, not a reconstruction of missing source. Stopping a response should use interrupted, not complete: literal unmatched syntax may reappear when a snapshot is finalized as ordinary Markdown. The caller retains the original source for persistence and Markdown copying. Native selection copies the rendered text. Custom renderers receive the presentation AST, whose positions may differ from the original partial source.

Identical content inputs reuse the rendered document across parent/status updates. Changed snapshots still parse as a whole, preserving cross-block references; this is not an incremental Markdown parser. Keep components and citations references stable when unchanged, and batch high-frequency updates in the host. There is no artificial typing delay. Long-running transport and completion announcements remain application responsibilities.

Content and Grid ownership

The root adds no outer padding, border, background, heading, or controls. Grid owns region spacing and structural seams. Markdown owns document typography, list indentation, quotes, code surfaces and table cell borders. Native div props, className, inline styles and a div ref are forwarded. Content inherits the nearest Theme palette. Compose FollowScroll around a bounded reading region; readers who scroll away should be able to inspect earlier content.

Content boundary and citations

Raw HTML is skipped. URLs pass through react-markdown's safe default transform; there is no raw-HTML or unsafe URL-transform escape hatch. components can replace semantic renderers, including code, links and images. Those trusted renderers own their output and accessibility; never inject untrusted HTML. Images use the supplied URLs, so the application owns remote-media policy.

Use [1](#citation:guide) with citations={[{ id: "guide", title: "Guide", href: "https://example.com" }]} to resolve application-supplied citations. IDs must be nonempty and unique. Unknown citations, incomplete destinations and rejected URLs render without an active link. A custom link renderer can compose the application's existing citation presentation. Changed citation metadata and custom renderers are applied even when the text snapshot is unchanged.

Compose messages with native article/heading elements and @gridui/follow-scroll. Keep author identity, timestamps, message actions, retries and persistence in the application. The Streaming story steps through deterministic snapshots; the Grid reader adds burst delivery, interruption, failure and long-response playback.

See release history.

Component reference contains focused API pages for each public component.