molecules
Design pages nav
The sidebar navigation of these design-system docs, with up to three levels of links and the current page highlighted.
Specimens
{{ DesignPages.render({
currentUrl: "/docs/design/molecules/",
nav: [
{
title: "Atoms",
url: "/docs/design/atoms/",
children: [{ title: "Button", url: "/docs/design/atoms/button/" }]
},
{
title: "Molecules",
url: "/docs/design/molecules/",
children: [
{
title: "Stats",
url: "/docs/design/molecules/stats/",
children: [
{
title: "Stats slots",
url: "/docs/design/molecules/stats/slots/"
}
]
}
]
}
]
}) }}Params
| Param | Type | Description |
|---|---|---|
nav | array | eleventyNavigation entries (title, url, children). Each child may carry a group label; children are expected pre-sorted. A top-level entry may carry part. The caller pre-filters. |
currentUrl | string | The entry whose url matches gets aria-current="page" and the highlighted style. |
home | object | Optional { url, title }. Renders as the first link, before any part or section. The layout passes the Design root as “Introduction”. |
label | string | The <nav>'s accessible name. Defaults to “Design section navigation”; the layout passes “Design section navigation”. |
Fixed design: takes no styling params. Its colours are set for the dark
docs ground (neutral-950): neutral links, neutral-800 hover, aprimary-900 current entry, and neutral-500 uppercase group labels.