Skip to content

ButterIX v1 is out: versions, multiple languages, Ask AI, and a per-site MCP server, all built in. →

Files

<Files> (alias <Tree>) is a collapsible file tree.

A collapsible file tree (aliases <Tree>, <FileTree>; <Tree.Folder> and <Tree.File> work too):

<Files>
  <Folder name="my-docs" defaultOpen>
    <File name="docs.yml" highlighted comment="site config" />
    <Folder name="pages" defaultOpen>
      <File name="introduction.mdx" href="/guides/get-started/introduction" />
    </Folder>
    <Folder name="assets">
      <File name="logo.svg" />
    </Folder>
  </Folder>
</Files>
my-docs
docs.yml# site config
pages
assets
logo.svg

Props shared by <Folder> and <File>:

namestringRequired
Displayed name.
hrefurl
Makes the name a link.
highlightedbooleanDefault false
Accent-colored background.
commentstring
Monospace comment after the name (shown starting with #).
iconicon
Custom icon.
defaultOpenbooleanDefault false
<Folder> only: open by default (open also works).