File trees
Files, Folder and File.
Three components render a directory tree with per-entry comments.
The root container. No props.
Children: File or Folder only, at least one.
Folder
Section titled “Folder”namestringrequiredThe directory’s name.
defaultOpenbooleandefault: falseRenders expanded.
commentstringNote shown beside the entry.
Children: File or Folder only — nest to whatever depth the tree needs.
namestringrequiredThe file’s name.
commentstringNote shown beside the entry.
A leaf: no children.
Example
Section titled “Example”<Files> <File name="docs.json" comment="the single configuration entry point" /> <Folder name="content" defaultOpen> <File name="index.mdx" /> <Folder name="reference"> <File name="cli.mdx" /> </Folder> </Folder></Files>When a fenced block is better
Section titled “When a fenced block is better”A fenced code block showing a tree is copy-pasteable, diffs cleanly, and costs nothing to write. Use these components when you want per-entry commentary or collapsible depth — otherwise plain text is the better tool.