Skip to main content

organisms

Primary nav

The site's main navigation as a row of links built from the CMS navigation document, with the current page marked.

Specimens

This page's own header and footer already render this nav, and it always emits the id "primary-nav", so a specimen would add a third duplicate id.

Params

ParamTypeDescription
itemsarrayNavigation entries. Takes precedence over cms and pages.
cmsobjectnavigation[0].headerItems feed the menu when items is not set.
pagescollectioneleventyNavigation source, used when neither items nor the CMS items exist.
classesstring, variant map, or arrayApplied to the <nav> through classes.
currentUrlstringForwarded to the menu for aria-current.

Notes

The links come from the CMS navigation document's header items, then from an items param, then from the Eleventy navigation tree. The id primary-nav is hard-coded, which is why the header plus footer already duplicate it on every page.