Markdown JSX
Export WLJS notebook cells as MDX-compatible web components and assets for embedding interactive Wolfram content in React and Next.js sites.
This export option converts notebook cells into HTML web components and associated assets compatible with MDX (Markdown React), making it easy to embed them in a webpage, such as your blog post or note.
Call Share from the top menu or click the icon and choose MDX:
Use cases
- Embed notebook cells in an MDX blog post or React webpage
- Share your work on the internet with interactive components
The page you're looking at was designed using MDX. The entire WLJS Notebook documentation was created using the WLJS MDX exporter and Next.js
React WLJS cells provide the same features as the standard HTML export option, including:
Features
- Lazy Loading - Components and dependencies load progressively, showing meaningful raw content while loading
- Interactive Content - 2D/3D graphics, plots, manipulatable widgets, and more
- CDN-Ready - Single script import; all dependencies load automatically
- No NPM Dependencies - Uses pure web components; no need to install any packages
Generated MDX structure
Narrative Markdown cells remain Markdown in the exported file. Code cells and their visible output are emitted as wljs-editor web components. Their source stays readable while the bootstrap loads and when JavaScript is disabled; after loading, the components add syntax highlighting and supported interactive output.
Load the bootstrap once in the page or site layout:
<script
type="module"
src="https://cdn.jsdelivr.net/gh/WLJSTeam/web-components@latest/src/common/app.js"
></script>The web-components MDX example shows this setup in a React/Next.js project.
Export Options
For detailed export options and modes (Static, Interactive, etc.), see the HTML file export documentation.
How to Use
After exporting, you'll receive a folder containing MDX components and assets. Simply drop them into your Next.js or similar MDX-compatible project. For detailed integration instructions and examples, see:
wljsteam/web-components-mdx
0