Nextra 中文文档
FileTree

File Tree 文件树组件

示例

    • _meta.json
    • contact.md
    • index.mdx
  • 用法

    Markdown
    import { FileTree } from 'nextra/components'
     
    <FileTree>
      <FileTree.Folder name="pages" defaultOpen>
        <FileTree.File name="_meta.json" />
        <FileTree.File name="contact.md" />
        <FileTree.File name="index.mdx" />
        <FileTree.Folder name="about">
          <FileTree.File name="_meta.json" />
          <FileTree.File name="legal.md" />
          <FileTree.File name="index.mdx" />
        </FileTree.Folder>
      </FileTree.Folder>
    </FileTree>