<browser-window> Web Component
@zachleat/browser-window
Used in demos as a way to fake a Safari-esque web browser window.
Demo GitHub277 npm- Versions
19 versions in
3.0.0New - Audit
-
0 reports
0 deps - Issues
-
3
3 - PRs
-
0
2
A lightweight themed zero-dependency web component wrapper to emulate a Safari-esque browser window for demos and presentations.
Originally used in the slide deck for This Web Site is a Tech Talk.
Notably (as this component is best for demos) it does use client rendering via Shadow DOM to add the markup for browser chrome around the content. Before JavaScript or without JavaScript, the fallback content is rendered as expected.
Demos
Here’s a live demo of it in action.
This one has a shadow.
Source code:
<browser-window>
<p>Here’s a <em>live demo</em> of it in action.</p>
</browser-window>
<browser-window shadow>
<p>This one has a shadow.</p>
</browser-window>
This one has a URL bar (with favicon) and an iframe:
Or maybe another demo of a screenshot of the demo page:


