Disclosure Tree Nav
A file tree with indent guide lines down each branch, where the collapsed folder turns its caret a quarter and rolls its children open along the guide while the tree grows to make room.
- lines of CSS
- 55lines of CSS
- dependencies
- 0dependencies
- browser, for years
- Everybrowser, for years
- motion only on interaction
- Hovermotion only on interaction
Vue, Svelte, styled-components and Tailwind exports are part of Pro. HTML, CSS and React are free forever.
.fx-v14-nav-tree-15686 {
width: 190px;
padding: 0.45rem 0.5rem;
font-size: 0.72rem;
background: #0d1526;
border: 1px solid #253049;
border-radius: 0.55rem;
}
.fx-v14-nav-tree-15686 .r {
display: flex;
align-items: center;
gap: 0.35rem;
height: 20px;
padding: 0 0.3rem;
color: #94a3b8;
border-radius: 0.25rem;
cursor: pointer;
transition: background 0.16s ease, color 0.16s ease;
}
.fx-v14-nav-tree-15686 .r:hover { background: #172033; color: #e2e8f0; }
.fx-v14-nav-tree-15686 .ac { color: #7dd3fc; background: #16243c; }
.fx-v14-nav-tree-15686 .cv {
width: 7px;
height: 8px;
background: #64748b;
clip-path: polygon(0 0, 100% 50%, 0 100%);
transition: transform 0.28s ease;
}
.fx-v14-nav-tree-15686 .op .cv { transform: rotate(90deg); }
.fx-v14-nav-tree-15686 .fd {
width: 13px;
height: 10px;
border-radius: 1px 2px 2px 2px;
background: #38bdf8;
clip-path: polygon(0 0, 46% 0, 58% 22%, 100% 22%, 100% 100%, 0 100%);
}
.fx-v14-nav-tree-15686 .fl {
width: 10px;
height: 12px;
background: #475569;
clip-path: polygon(0 0, 68% 0, 100% 28%, 100% 100%, 0 100%);
}
.fx-v14-nav-tree-15686 .ch {
margin-left: 0.62rem;
padding-left: 0.5rem;
border-left: 1px solid #253049;
}
.fx-v14-nav-tree-15686 .fold {
max-height: 0;
opacity: 0;
overflow: hidden;
transition: max-height 0.34s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.24s ease;
}
.fx-v14-nav-tree-15686:hover .cl .cv { transform: rotate(90deg); }
.fx-v14-nav-tree-15686:hover .fold { max-height: 42px; opacity: 1; }<nav class="fx-v14-nav-tree-15686">
<div class="r op"><i class="cv"></i><i class="fd"></i>src</div>
<div class="ch">
<div class="r"><i class="fl"></i>index.tsx</div>
<div class="r ac"><i class="fl"></i>app.tsx</div>
</div>
<div class="r cl"><i class="cv"></i><i class="fd"></i>components</div>
<div class="ch fold">
<div class="r"><i class="fl"></i>card.tsx</div>
<div class="r"><i class="fl"></i>nav.tsx</div>
</div>
<div class="r"><i class="fl"></i>readme.md</div>
</nav>What do I do with this?
- Put
disclosure-tree-nav-15687.cssanywhere your page already loads CSS from — in Next.js that isapp/globals.css, or any stylesheet with a<link>in your HTML. - Then put the class on the element you want it on:
<button class="fx-v14-nav-tree-15686">. The CSS does nothing until a class name in it matches something on the page.
- Link the stylesheet, then paste the markup wherever you need it.
npx hoverlab add disclosure-tree-nav-15687What's included
- The markup and the stylesheet, in whichever framework you pick
- No runtime dependencies
Works with
- React
- Vue
- Svelte
- Tailwind
- styled-components
- Plain CSS
npx hoverlab add disclosure-tree-nav-15687
Or over MCP, from your editor's agent — no account needed.
License
Free to read, copy and install, for personal and non-commercial projects. Shipping it in client work or a paid product needs Pro ($79 once). The source lands in your repo and stops being ours — no attribution, nothing to upgrade.
Motion safety
Static estimate, read from the CSS
- Reduced motion
- Brief motion, no guard
Animates briefly or on interaction. Only looping motion gets a guard in this catalog; copy the one from the Insights tab if this ships on a critical path.
- What it animates
- Reflows
Animates
max-height(andbackground,color). The browser re-lays-out the page on every frame; prefertransformif you can. - Flashing (WCAG 2.3.1)
- No flashing found
No repeating change in opacity, colour or brightness large enough to count as a flash.
- Layout shift (CLS)
- May shift layout
Animates
max-heighton a box in flow, so content beside or after it can move. A category from the CSS, not a measurement for this effect.
Every row is read from the shipped CSS. Only a figure marked measured came from a browser. Customizing the speed changes the timing, so recheck a customized copy. How it is computed
33 more effects in Navigation & Menus
All of them free to read, copy and install — no account, no locked tiles, no watermarked preview. The whole catalog is open, and so are the API and the CLI.
Browse Navigation & MenusShipping one commercially
Copying the code is free. Putting it in client work or a paid product is what Pro is for — the licence, not the access.
- A commercial licence for everything in the catalog
- Unlimited bundle exports, in Vue, Svelte and Tailwind
- One payment — no subscription, nothing to renew
7 variations of Disclosure Tree Nav
Finished looks, each one a position in the customizer above. Copy any of them, or open it and keep moving the sliders.