Search documentation

Type to search.

Navigate · Enter to open · Esc to close

On this page
  • content
    • index.md
    • writing.md
  • monoline-docs.yml
View code
import FileTree from "@chitrank2050/monoline-docs/components/FileTree.astro";

<FileTree
  items={[
    {
      name: "content",
      children: [
        { name: "index.md" },
        { name: "writing.md", highlight: true },
      ],
    },
    { name: "monoline-docs.yml" },
  ]}
/>

Usage

Folders use native disclosures and default to expanded. expanded applies only to folders; highlight marks a file or folder. Cycles and more than 20 nested folders are rejected.

Initially collapsed folder

  • assets
    • favicon.svg
View code
import FileTree from "@chitrank2050/monoline-docs/components/FileTree.astro";

<FileTree
  label="Assets"
  items={[
    {
      name: "assets",
      expanded: false,
      children: [{ name: "favicon.svg" }],
    },
  ]}
/>

API reference

FileTree props
NameTypeDefaultDescription
itemsEntry[]RequiredEntries have name and optional children, expanded and highlight.
labelstringProject filesAccessible group label.

Behavior and accessibility

Folders use native details controls. Enter or Space toggles the focused folder; file labels remain readable without JavaScript.