File tree
A folder structure, with icons per file type.
A directory listing as a tree, with the icon for each file type read from its extension.
Usage
your-project/
- docs
- index.md
- 1.getting-started
- index.md
- 1.installation.md
- app
- app.config.ts
- nuxt.config.ts
API
Props
| Prop | Type | Default | Notes |
|---|---|---|---|
tree | Entry[] | — | Given as YAML in the block's body |
title | string | — | The root label above the tree |
An entry is { name, children? }. A name ending in /, or one carrying
children, is a directory.
Notes
Built on reka-ui's tree, so it has roving focus, arrow-key navigation and the ARIA roles. Nodes are keyed by path rather than by name: names repeat across branches, paths do not.
Was this page helpful?