API Reference

Tree

Show a file or hierarchy structure — directories and leaves, nestable.

Show a file or hierarchy structure. Use Tree.Folder for directories (nestable) and Tree.File for leaves.

When to use it

Reach for a tree whenever you're describing a layout on disk — a repo structure, a config directory, where files land after scaffolding. Mark the folders the reader cares about with defaultOpen so the relevant branch is expanded on load.

Props

ComponentPropTypeDescription
<Tree.Folder>namestringFolder name
<Tree.Folder>defaultOpenbooleanStart expanded
<Tree.File>namestringFile name

Live example

On this page

Built withsuperlore