August 19, 2026

Docusaurus pages are MDX, which means JSX works inside your Markdown and an iframe is simply an element you write.
That makes this the easiest kind of site to embed in, and the one where it is most worth building a small component rather than pasting markup repeatedly.
In any `.mdx` file, write the iframe directly. Note that MDX is JSX, so attributes are camelCase and `style` takes an object: `style={{ width: "100%", aspectRatio: "16/10", border: 0 }}`.
A plain `.md` file will not do this. Rename it to `.mdx` if you need an embed in it.
Create `src/components/Demo.jsx` wrapping the iframe with your sizing, lazy loading and a title, then use `<Demo id="..." />` throughout the docs.
This pays for itself the first time you change how demos are embedded, and it keeps the markup out of pages that should read as documentation.
Docusaurus ships a dark mode. A demo recorded against a light interface will sit as a bright rectangle in a dark page -- acceptable, but worth knowing before someone reports it as a bug.
Versioned docs are the real maintenance question: a demo embedded in a versioned page is frozen with that version's prose but not with the product. Decide deliberately whether old versions keep the old demo or point at the current one.
Click through it — the same kind of demo you can record of your own product.
Record your first interactive demo free.
Five demos on the free plan, forever. No credit card, no trial countdown, no sales call. Install the Chrome extension, click through your product once, and you have a shareable link in about ten minutes.
Start free →