vibran

File tree sidebar, explorer

Portuguese name: Sidebar de árvore de arquivos

A folder and file tree with rotating arrows, folders that open with animated height, indent guide lines and icons coloured by extension. Selecting a file updates the title and the panel beside it. Full keyboard support in the tree pattern.

Preview of File tree sidebar, explorer running live
Copy the promptAdjust colors and speed

When to use it

For code editors, file managers, documentation with many pages and any content in a hierarchy three or more levels deep. With only two levels the accordion does it with less. The code wires up the tree roles, roving tabindex and type-ahead. Elements with data-sb-titulo and data-sb-caminho receive the current file, and the "arquivo" event notifies your app.

How to add it to your site

  1. Copy the prompt in the gallery. It comes with the effect's name and the full code. The prompt text is written in Portuguese, and AI builders handle that fine.
  2. Paste it into your AI: Lovable, Claude, Cursor, Bolt or v0.
  3. Done: the AI adds the effect to your project, just like you saw it here.

Use it in HTML

The effect is plain JavaScript, no library. Just put the data-efeito attribute on the element:

<nav data-efeito="sidebar-arvore" aria-label="Arquivos">
  <ul>
    <li aria-expanded="true"><button><svg>…</svg><span>css</span></button>
      <ul><li><button data-painel="#p1"><svg>…</svg><span>estilo.css</span></button></li></ul>
    </li>
    <li><button data-painel="#p2"><svg>…</svg><span>index.html</span></button></li>
  </ul>
</nav>
<h2 data-sb-titulo></h2> <pre id="p1" hidden>…</pre>

More sidebar effects

All 22 sidebar effects →