A file tree for SolidJS

solid-trees is a SolidJS 2 port of @pierre/trees: a virtualized, path-first file tree with search, renaming, drag and drop, Git status, and sticky folders, rendered in the light DOM.

Documentation

Flatten empty directories

flattenEmptyDirectories collapses single-child folder chains into one row. Each segment stays a drop target.

Show Git status on files

gitStatus adds badges for added, modified, deleted, renamed, untracked, and ignored files. Folders with changed descendants get a dot.

Use Shiki themes

themeToTreeStyles(theme) maps a Shiki/VS Code theme to --trees-theme-* variables; pass the result as the tree's style. The page color scheme picks the light or dark theme.

Style with CSS variables

Set --trees-*-override variables on the tree (or any ancestor) to recolor it. Overrides win over theme tokens, which win over the defaults.

Adjustable density

density (compact, default, relaxed, or a number) sets the row height and the spacing factor in one place.

Virtualized, with sticky folders

5,000 files, every folder open. Only the visible rows render; the folders you are inside stick to the top while you scroll.