Skip to content
TanStackPublic

About

Tiny, fast Markdown parsing and rendering for blogs and documentation

Resources

Contributing

Stars

432 stars

Watchers

1 watching

Forks

Repository files navigation

TanStack Markdown

TanStack Markdown

A tiny, fast, deterministic Markdown parser and renderer for blogs and documentation.

  • separately importable parser, HTML renderer, React adapter, and Octane adapter
  • zero runtime dependencies
  • serializable AST
  • safe defaults for raw HTML and executable URLs
  • optional docs extensions and external syntax highlighting
  • optional AI streaming profile

The generated bundle report records minified, gzip, and Brotli sizes for reproducible browser import profiles. Renderer measurements include the parser and exclude framework runtimes and syntax highlighters; complete public-entry measurements are listed separately.

pnpm add @tanstack/markdown

If you use an AI agent, run npx @tanstack/intent@latest install so it can discover the package's task-specific skills.

import { renderHtml } from '@tanstack/markdown/html'

const html = renderHtml('# Fast by default')
import { Markdown } from '@tanstack/markdown/react'

export function Article({ source }: { source: string }) {
  return <Markdown>{source}</Markdown>
}
import { Markdown } from '@tanstack/markdown/octane'

export function Article({ source }: { source: string }) @{
  <Markdown>{source}</Markdown>
}

TanStack Markdown targets controlled technical content. It supports the Markdown used by blogs and docs, with deterministic output, renderer parity, malformed-input limits, and separately importable entry points. It is intentionally not a complete CommonMark, GFM, MDX, or general content-processing implementation.

For syntax highlighting, use the tested TanStack Highlight adapter. It registers only the languages you choose and returns escaped token markup inside Markdown-owned code containers.

Documentation

Verification

pnpm run verify

To include downstream content in the corpus gate:

MARKDOWN_CORPUS_DIRS=../tanstack.com/src/blog:../tanstack.com/docs \
  pnpm run test:corpus

To audit practical compatibility across local TanStack repositories and a pinned external docs/blog sample:

pnpm run corpus:audit:tanstack
pnpm run corpus:audit:external

Generated reports:

About

Tiny, fast Markdown parsing and rendering for blogs and documentation

Resources

Contributing

Stars

432 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages