About this set
A dark, monospaced file explorer like the sidebar of a code editor. Under an Explorer heading, folders (src, components, lib, public) expand and collapse with a turning chevron, files are indented by depth, the open file Header.tsx is highlighted in blue and two files carry an M badge for modified. Use it for documentation sites organised in folders, code browsers, or any nested navigation where the hierarchy matters more than the individual page. The structure is nested lists, so the depth of every item is part of the markup and screen readers can announce list levels. Each folder is a native details element, which makes it a keyboard-operable disclosure with no script; an optional handler lets Esc close the folder you are in and return focus to its name. The open file carries aria-current=”page” and the M badges include hidden text that reads as modified. The Bootstrap version turns each folder into a button that toggles a .collapse through the Collapse plugin, and the Tailwind version keeps details and summary with named group-open variants.
Whatβs included
- Folders that expand and collapse with a rotating chevron
- Depth shown by nested lists and indentation
- Open file highlighted and marked with aria-current
- Modified badges with screen reader text
- Esc closes the folder you are in
Accessibility
The tree is a nav named by its Explorer heading. Folder names are disclosures announced as expanded or collapsed (summary elements, or buttons with aria-expanded in Bootstrap) and toggle with Enter or Space. Links and folder names show a 2px light blue outline on keyboard focus, the M badges read as modified, and the chevron animation is removed under prefers-reduced-motion.
Customise it
Change the panel, hover and highlight colours in .tree and .tree-f (plain CSS), the .tree .nav-link variables and .badge colours (Bootstrap) or the --color-tree-* theme colours (Tailwind). Indentation per level is the 14px padding on nested lists.



















