Skip to main content

File Tree

Browse folders & files from a list of paths, opening folder by folder, built on Base UI.

Installation

Component API

PropTypeDefaultDescription
pathsstring[]-
labelstringFilesThe tree's accessible name.
The tree's accessible name.
defaultExpandedstring[]-The folders open on first render, by path.
The folders open on first render, by path.
defaultSelectedstring-
selectedstring-The controlled picked row, by path.
The controlled picked row, by path.
onSelectedChange(selected: string) => void-Called with the path of the row just picked.
Called with the path of the row just picked.
shapenone | rounded | pillrounded
animatedbooleantrue
classNamestring-
focusboolean | stringtrue