DocCardList
The DocCardList component renders a responsive grid of cards that link to other documentation pages. Use it on category index pages to give readers an overview of available topics, or anywhere you want a visual navigation block.
This is the Trellis Docs equivalent of Docusaurus' <DocCardList />.
Features
- Auto mode — pass a
categoryname and cards are generated from the sidebar config + doc frontmatter - Manual mode — pass an explicit
itemsarray for full control - Responsive 2-column grid (1 column on mobile)
- Styled with design tokens — adapts to light and dark mode
Usage
Auto mode (from sidebar)
Pass the category prop with the exact sidebar category label. The component finds the matching category in config/sidebar.ts and renders a card for each child item, pulling titles and descriptions from frontmatter.
<DocCardList category="Guides" />Result:
Docs
Create doc pages, configure frontmatter, manage the sidebar, and organize content.
Blog
Create blog posts and release notes in the Trellis docs framework.
Markdown Features
Supported markdown syntax and content features in Trellis.
Components
Reusable React components included in the Trellis framework.
Style and Layout
Theme components, design tokens, and visual customization in Trellis.
Search
Built-in smart search with Fuse.js and automatic FAQ indexing.
Site Configuration
Customize your site identity, navigation, sidebar, and content variables.
Content Audit
Export your doc inventory as a CSV for content audits, gap analysis, and stakeholder reporting.
Deployment
Build and deploy your Trellis docs site to any static hosting provider.
Internationalization
Translate your documentation into multiple languages with locale-based routing and automatic fallback.
What's Next?
Where to go after setting up your Trellis documentation site.
Grouped mode (nested subcategories)
When a sidebar category has subcategories, passing grouped renders each subcategory as its own titled section with its own card grid. Direct docs of the top-level category render first in an ungrouped block; subcategories then render in sidebar order beneath them.
<DocCardList category="Contribute to Alchemy" grouped />Flat mode (the default) collapses subcategories into single cards linking to each subcategory's index page. Grouped mode expands them into sections, which is what you want on overview pages where subcategories have multiple children the reader might want to skim.
One level of grouping only — sub-subcategories still collapse to single cards within their parent section.
Manual mode (explicit items)
Pass an items array when you want full control over which cards appear and in what order.
<DocCardList items={[
{
title: "Getting Started",
description: "Install Trellis and create your first project.",
href: "/getting-started/"
},
{
title: "Content Authoring",
description: "Create new pages, blog posts, and release notes.",
href: "/guides/docs/"
}
]} />Result:
Getting Started
Install Trellis and create your first project.
Content Authoring
Create new pages, blog posts, and release notes.
Single card
Use DocCard directly when you need just one card.
<DocCard
title="Deployment"
description="Deploy your Trellis site to any static host."
href="/guides/deployment/"
/>Props
DocCardList
| Prop | Type | Required | Description |
|---|---|---|---|
category | string | No | Sidebar category label (case-insensitive). Resolves child items automatically. Searches every sidebar in config/sidebar.ts's sidebars registry. |
items | DocCardListItem[] | No | Explicit array of card data. Takes priority over category. |
grouped | boolean | No | When true (and category is set), subcategories render as titled sections with their own card grid. Ignored when items is provided. Default: false. |
Provide either category or items. If both are passed, items wins.
DocCardListItem
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Card heading text |
description | string | No | Short summary shown below the title (max 2 lines) |
href | string | Yes | Link target (relative path) |
DocCard
| Prop | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Card heading text |
description | string | No | Short summary shown below the title |
href | string | Yes | Link target (relative path) |
Tips
- Category names are case-insensitive —
"guides","Guides", and"GUIDES"all match the same sidebar category. - Descriptions come from frontmatter — in auto mode, each card's description is pulled from the
descriptionfield in the target page's YAML frontmatter. Pages without a description show only the title. - Nested categories — the
categoryprop searches the full sidebar tree, so nested categories work too. - Both components are globally registered — no import needed in MDX files.
-
Do something first.
Tips-
You can also resize the widget if it's too wide by using the resize blue handle in the bottom-right corner of the widget.

-
In addition to adding widgets, you can Delete widgets.

-
In addition to adding widgets, you can Restore Defaults or Clear All widgets.

-
-
Do something else.