Collection Content - Documentation.AI

Collection Content

Reference for the CollectionContent component that displays the full nested tree under a navigation node as a collapsible accordion structure.

Overview

CollectionContent renders the full nested tree under a navigation node as a recursive, collapsible accordion. Instead of showing only direct children, it displays the complete hierarchy at all levels so readers can drill down through multiple layers of your navigation.

Use CollectionContent to:

You can add the component in two ways:

Collection components read your live navigation structure. When you add, remove, or reorder pages in a group, the collection updates automatically on your next deploy. Because they resolve against your actual navigation tree, they cannot be previewed as static examples on this page; add one to a page in your own project to see it in action.

Understanding the node attribute

The node attribute tells the component which navigation node's full tree to display.

The node value is a path that walks your navigation tree using the format type:name, separated by / for each level. For example:

Node path What it targets
tabs:Guides The tab named "Guides"
tabs:API/groups:Authentication The "Authentication" group inside the "API" tab
groups:Getting Started The group named "Getting Started"
dropdowns:Platform/tabs:REST The "REST" tab inside the "Platform" dropdown

The component resolves the node at render time and displays its full descendant tree.

In the Web Editor, you do not need to write the node path manually. The slash menu opens a visual navigation tree picker where you select the target node by clicking.

Using with Web Editor

  1. Place your cursor on a new line.
  2. Type / and search for Collection Content.
  3. Select Collection Content from the Dynamic category.
  4. A navigation tree picker opens. Select the target node.
  5. The component is inserted. Click the edit icon to toggle the default expansion state.

Using with Code Editor

<CollectionContent node="tabs:Guides" default-expanded={false} />

Container nodes (groups, tabs, dropdowns) render as collapsible sections with a chevron. Leaf pages render as clickable links. The tree indents at each level for visual clarity.

Attribute reference

Attribute Description
path Navigation node path in type:name/type:name format. Identifies which node's full tree to display.
default-expanded Whether all tree nodes start expanded. Defaults to false (collapsed).

When to use CollectionContent vs CollectionList

Scenario Recommended component
Landing page for a section with a few groups CollectionList with cards layout
Quick navigation links in a sidebar or footer CollectionList with links layout
FAQ-style browsing of a section CollectionList with accordion layout
Full table of contents for a deep section CollectionContent
Displaying only direct children, not nested items CollectionList
Displaying the entire hierarchy at all levels CollectionContent

Best practices