<div class="tree">
<ul class="tree-list">
<li class="tree-node">
<div class="tree-item">
<span class="tree-toggle tree-toggle-expanded"><svg viewBox="0 0 10 10" class="size-3.5"><path d="M3 1l4 4-4 4" fill="none" stroke="currentColor" stroke-width="1.5"/></svg></span>
<span class="tree-icon tree-icon-folder"><svg xmlns="http://www.w3.org/2000/svg" class="size-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"/></svg></span>
<span class="tree-label">src</span>
<span class="tree-badge">4</span>
</div>
<ul class="tree-list tree-list-nested">
<li class="tree-node">
<div class="tree-item">
<span class="tree-toggle tree-toggle-expanded"><svg viewBox="0 0 10 10" class="size-3.5"><path d="M3 1l4 4-4 4" fill="none" stroke="currentColor" stroke-width="1.5"/></svg></span>
<span class="tree-icon tree-icon-folder"><svg xmlns="http://www.w3.org/2000/svg" class="size-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"/></svg></span>
<span class="tree-label">components</span>
</div>
<ul class="tree-list tree-list-nested">
<li class="tree-node">
<div class="tree-item tree-item-selected">
<span class="tree-toggle tree-toggle-empty"><svg viewBox="0 0 10 10" class="size-3.5"><path d="M3 1l4 4-4 4" fill="none" stroke="currentColor" stroke-width="1.5"/></svg></span>
<span class="tree-icon tree-icon-file"><svg xmlns="http://www.w3.org/2000/svg" class="size-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/></svg></span>
<span class="tree-label">Button.tsx</span>
</div>
</li>
<li class="tree-node">
<div class="tree-item">
<span class="tree-toggle tree-toggle-empty"><svg viewBox="0 0 10 10" class="size-3.5"><path d="M3 1l4 4-4 4" fill="none" stroke="currentColor" stroke-width="1.5"/></svg></span>
<span class="tree-icon tree-icon-file"><svg xmlns="http://www.w3.org/2000/svg" class="size-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/></svg></span>
<span class="tree-label">Card.tsx</span>
</div>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
Requires: ux.min.css
<div class="text-[0.9375rem] select-none">
<ul class="list-none m-0 p-0">
<li>
<div class="flex items-center gap-1 px-2 py-1 rounded-field cursor-pointer hover:bg-base-200">
<svg class="size-5 text-base-content/40 rotate-90">...</svg>
<svg class="size-5 text-warning">...</svg>
<span class="flex-1 truncate">src</span>
</div>
<ul class="list-none m-0 pl-4"><!-- nested items --></ul>
</li>
</ul>
</div>
Requires: tw.min.css
// Toggle expand/collapse:
// toggle.addEventListener('click', () => {
// toggle.classList.toggle('tree-toggle-expanded');
// children.hidden = !children.hidden;
// });