Zach’s ugly mug (his face) Zach Leatherman

<browser-window> Web Component

October 26, 2023 #15 Popular

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.


Here’s a live demo of it in action.

This one has a shadow.

Source code:

	<p>Here’s a <em>live demo</em> of it in action.</p>

<browser-window shadow>
	<p>This one has a shadow.</p>

This one has a URL bar (with favicon) and an iframe:

Or maybe another demo of a screenshot of the demo page:

Screenshot image for

< Newer
The Squirminal Web Component
Older >
Seven Million npm Downloads for Eleventy

Zach Leatherman IndieWeb Avatar for a builder for the web and the creator/maintainer of IndieWeb Avatar for https://www.11ty.devEleventy (11ty), an award-winning open source site generator. At one point he became entirely too fixated on web fonts. He has given 81 talks in nine different countries at events like Beyond Tellerrand, Smashing Conference, Jamstack Conf, CSSConf, and The White House. Formerly part of CloudCannon, Netlify, Filament Group, NEJS CONF, and NebraskaJS. Learn more about Zach »


Martin SchneiderCarlton Gibson ????????Dave RupertChristopher Kirk-NielsenRaymond CamdenZach LeathermanZach LeathermanZach LeathermanZach LeathermanIndieWeb Avatar for https://www.alvinashcraft.comBrian DavidZach LeathermanMassimo Artizzu ????????????remjackyalcinéThe Spicy WebNaiyerAlexis DeveriaAndersMartin SchneiderJonathan SchofieldJason GarberCarlton Gibson ????????brussolo.igor ????️‍????Tixie Salander ????Baldur BjarnasonBob MonsourLinh PhamRaymond CamdenAntonio Sarcevic


Robin HooverCaleb JenkinsEgor KloospassleCloudCannonMarioJonasMassimo Artizzu ????????????Florian Geierstangerkaiserkiwi :kiwibird:Jeremy NeanderAmadeus MaximilianWesley SoaresJoe GaffeyTyler StickaPatrick O'BrienMike AparicioEvanAdrianna TanKaiAlex Guyot :plus:Sia KaramalegosMarcellestrongestThe Spicy Webpgrucza@toot.cafeAlexis DeveriaMolly HCory Dransfeldt :prami:Third spruce tree on the leftMatt SteinAndersKeith J GrantJWDee-Yell (Dave)Ashur CabreraMartin SchneiderCarlton Gibson ????????brussolo.igor ????️‍????Alex CrockerBob MonsourBaldur BjarnasonHeather BuchelLinh PhamOne GabrielEugene Alvin VillarRyan BaumannDave ???? :cursor_pointer:jackyalciné
  1. Zach Leatherman

    Zach Leatherman

    @chriskirknielsen well, wait ????

  2. Carlton Gibson ????????

    Carlton Gibson ????????

    @zachleat (update: DISASTER emoji typo ????‍♀️ FIXED)

  3. Zach Leatherman

    Zach Leatherman

    @raymondcamden Thanks Raymond!

  4. Zach Leatherman

    Zach Leatherman

    @carlton I knew what you meant ????

  5. Konnor Rogers

    Konnor Rogers

    @zachleat wait... I actually have a use case for this...I'm working on building a "code pen like" editor using <textarea> + <pre> should pair perfectly for full page examples!!(Still a WIP)htt… Truncated

  6. Zach Leatherman

    Zach Leatherman

    @konnorrogers awesome!

  7. passle


    @zachleat Neat :)

Shamelessly plug your related post

These are webmentions via the IndieWeb and

Sharing on social media?

This is what will show up when you share this post on Social Media:

How did you do this? I automated my Open Graph images. (Peer behind the curtain at the test page)