molecules
Article nav links
An "On this page" list of jump links to an article's headings, collapsible on small screens.
Specimens
{{ ArticleNavLinks.render({
headings: [
{ id: "context", text: "Context" },
{ id: "approach", text: "Approach" },
{ id: "outcome", text: "Outcome" }
]
}) }}Params
| Param | Type | Description |
|---|---|---|
headings | array | Required array of {id, text} objects from the extractHeadings filter. |
classes | string | variant map | array | Optional extra CSS classes on the <nav>. |
Notes
Get headings from the extractHeadings filter on the article body. The component renders nothing when the list is empty.