PACKAGE · MARKDOWN

mdast-util-mdx-jsx

mdast extension to parse and serialize MDX or MDX.js JSX

WEEKLY DOWNLOADS 70.0M
STARS 35
FORKS 8
OPEN ISSUES 1
GZIP SIZE 5.3 kB
UNPACKED SIZE 58.8 kB
DEPENDENCIES 15
LAST UPDATED 1y ago
DOWNLOAD TRENDS

mdast-util-mdx-jsx downloads · last 12 months

Download trends for mdast-util-mdx-jsx1 download series from Nov 2025 to Oct 2026. Use left and right arrow keys to inspect monthly values.054.7M109.4M164.1M218.8MNov 2025FebMayAugOct 2026
mdast-util-mdx-jsx
ABOUT MDAST-UTIL-MDX-JSX

mdast-util-mdx-jsx extends mdast, the Markdown abstract syntax tree, to parse and serialize JSX syntax used in MDX and MDX.js. It provides the tree representation needed to preserve JSX elements and attributes as structured content alongside Markdown, rather than treating the markup as ordinary text.

The package is a focused interoperability layer for developers working with MDX syntax in mdast-based tooling. Its scope is specifically JSX parsing and serialization; it does not present itself as a complete Markdown processor, a UI framework, or a system for rendering components.

The central workflow is to use the package’s parsing and serialization capabilities as an mdast extension: recognize MDX JSX while building a tree, then serialize that JSX from the tree when producing output. This makes it relevant when a tool must inspect or transform JSX embedded in Markdown while retaining a structured document model.

It fits workflows built around mdast and MDX.js, including Markdown processing pipelines that need to handle JSX elements rather than discard or flatten them. Use it at the syntax-tree layer when connecting MDX documents to other transformations or tools that consume and produce mdast.

The package is MIT-licensed, version 3.2.2, and has an unpacked size of 58.8 kB with a reported gzip bundle size of 5.3 kB. Its published details also list 72.1M weekly downloads, 34 GitHub stars, 8 forks, 1 open issue, and a last-updated date of 2026-11-20; these figures describe the listing, not a guarantee of compatibility or maintenance quality.

Keep the scope in mind: this extension handles MDX or MDX.js JSX within mdast, not general JSX compilation or browser rendering. The provided package information does not specify detailed API signatures or compatibility constraints, so check its documentation before relying on particular node shapes or integration behavior.

WHEN TO USE
  • When parsing MDX or MDX.js into mdast and JSX elements need to be represented as structured syntax rather than plain text.
  • When serializing an mdast tree that contains MDX JSX and the output must retain its JSX syntax.
  • When building an mdast-based transformation that needs to inspect or modify JSX embedded in Markdown documents.
  • When connecting MDX document processing to other tools that consume or produce mdast trees containing JSX.
  • When your Markdown pipeline must distinguish JSX markup from surrounding Markdown during parsing and preserve it during serialization.
  • When you need an MIT-licensed, focused extension for the JSX portion of an MDX processing workflow, rather than a general-purpose renderer.
WHEN NOT TO USE
  • If you need to compile JSX into executable JavaScript or render it in a browser, use a compilation or rendering workflow; this package is scoped to mdast parsing and serialization.
  • If your input is ordinary Markdown with no MDX or MDX.js JSX, use a Markdown-only processing path rather than adding JSX handling.
  • If you need a complete MDX processing pipeline, use a broader MDX workflow and add this extension only where mdast JSX parsing or serialization is required.
  • If your tool does not use mdast trees, choose an integration designed for its document representation or add an mdast conversion step before using this extension.
  • If you require detailed guarantees about supported JSX syntax, node shapes, or compatibility, consult the package documentation first; the supplied package details do not define those constraints.
  • If you only need to display JSX as literal text in Markdown, use a text or code representation instead of parsing it as MDX JSX.

CORRECTIONS

Spot wrong data here?

A short note helps us fix it.

Anonymous · No account · No email back

COMPARISONS 5
mdast-util-mdx-jsx vs @mdx-js/react ★ 19.9K · 33.3M/wk mdast-util-mdx-jsx vs remark ★ 9.0K · 11.0M/wk mdast-util-mdx-jsx vs rehype ★ 2.3K · 5.3M/wk mdast-util-mdx-jsx vs shiki ★ 14.0K · 42.0M/wk mdast-util-mdx-jsx vs marked ★ 37.3K · 135.3M/wk