<script>
import Popup from './Popup.svelte'
const content = 'Hoozah!'
</script>
<h2>This is a popup component</h2>
<p>It opens a fullscreen overlay ...</p>
<iframe data-why>
<Popup {content}>Open</Popup>
</iframe>
<p>... contained within the iframe!</p>
It opens a fullscreen overlay ...
... contained within the iframe!
whyframe gives iframes superpowers,
making it easy to render anything in isolation.
Browsers ignore content within iframes by default,
whyframe leverages modern JavaScript bundlers to make it possible.
Supports most popular UI frameworks!
Anything within an iframe is isolated. Prevents scripts and styles from leaking out.
Wrap anything with an iframe and it will just work. No context switching needed.
Out-of-the-box support for major frameworks like Vite, SvelteKit, Astro, VitePress, and Nuxt.
Renders with your framework of choice as-is. Everything else is done in compile-time.
Reuse iframes with components. Add custom styles and logic. Make it whatever you want!
An iframe is simply a primitive. Build over it and bring your own opinions.
whyframe is made possible thanks to these fine folks