August 19, 2026

Astro sites are built to ship as little JavaScript as possible, which makes people cautious about third-party embeds.
An iframe is the one embed that does not undermine that: it adds no JavaScript to your bundle and loads in its own context.
In any `.astro` file, write the iframe as plain HTML. Astro is HTML-first, so unlike MDX there is no JSX translation to think about -- `style="..."` as a string is correct here.
No client directive is needed. There is no component to hydrate, so the demo costs you nothing in Astro's own terms.
Create `src/components/Demo.astro` taking the demo id and an optional title as props, with the sizing and lazy loading built in. Then `<Demo id="..." />` anywhere, including inside MDX content.
Consistency matters more than it sounds: it is how every demo on the site keeps its aspect ratio and lazy loading rather than depending on whoever pasted it.
If your marketing pages come from content collections, you can store a demo id as frontmatter and have the layout render the component when it is present.
That way adding a demo to a page is a one-line frontmatter change rather than an edit to the content body, which is much easier to keep tidy across dozens of pages.
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 →