Shadow DOM Explorer - Interactive Lab | IconVault

Explore open vs closed shadow roots, slots, ::part() and encapsulation with live demos. Free, runs fully in your browser.

All tools

Shadow DOM Explorer

Open vs closed shadow, slots, ::part(), encapsulation

5 of 5 free uses left

Live demo: Open vs Closed

#open-host

#closed-host

What happened

Run the demo to see real DOM results.

Copy-ready code

const openHost = document.querySelector("#open-host");
const openRoot = openHost.attachShadow({ mode: "open" });
openRoot.innerHTML = "<p>Open shadow content</p>";

// Anyone can reach in:
console.log(openHost.shadowRoot === openRoot); // true

const closedHost = document.querySelector("#closed-host");
closedHost.attachShadow({ mode: "closed" });

// Nobody can reach in, not even this script:
console.log(closedHost.shadowRoot); // null
// Keep your own reference if you need it:
// const closedRoot = closedHost.attachShadow({ mode: "closed" });

5 of 5 free copies left.

About this tool

IconVault's Shadow DOM Explorer makes web components' hidden machinery visible: attach open and closed shadow roots and see the access difference, project light-DOM content through named and default slots, style through the wall with ::part(), and prove encapsulation by watching page CSS fail to reach inside. It is free to use and runs fully in your browser with nothing uploaded.

How to use: work through the four tabs, run each demo, and read the what-happened log for real DOM results. Perfect for developers learning web components, custom elements and style scoping.

Frequently asked questions

Popular searches

shadow domshadow dom tutorialattachshadow exampleopen vs closed shadow domshadowroot modeclosed shadowroot nullslots explainedhtml slot elementslot name attributeassignednodesassignedelementsdefault slotslot fallback contentcss partpart css exampleexportpartsstyle shadow domshadow dom encapsulationshadow dom csshost selector csshost-contextslotted cssweb components tutorialcustom elementsshadow dom vs iframelearn shadow domshadow dom mdndeclarative shadow domtemplate shadowrootmodeshadow dom browser supportshadow dom polyfillevent retargetingcomposed eventsevent.composedpathshadow dom eventsform associated custom elementselementinternalsadoptedstylesheetsconstructable stylesheetsshadow dom performanceweb components examplesslotchange eventlight dom vs shadow domshadow dom interviewshadow dom playgroundweb components labcustom element slotsshadow dom guideshadow dom demoshadow dom encapsulation explained

More tools

Coming soon

CLI

Coming soon

Figma plugin

Coming soon

VS Code extension

Coming soon

Chrome extension

Coming soon

AI icon generator

Coming soon

Team workspaces

Coming soon

View all 10+ tools →