SectionNav
A navigation container for section navigation links.
A navigation container for section navigation links.
<div class="section-nav" aria-label="a navigation container for section navigation links">SectionNav</div><SectionNav label="In this section">
<SectionList>
<SectionListItem><SectionLink href="/section-a">Section A</SectionLink></SectionListItem>
<SectionListItem><SectionLink href="/section-b" current>Section B</SectionLink></SectionListItem>
</SectionList>
</SectionNav>
// In your Svelte component:
import SectionNav from "lily-design-system-svelte-headless/components/SectionNav/SectionNav.svelte";
<SectionNav label="Navigation">
<!-- nav children -->
</SectionNav>
<SectionNav label="In this section">
<SectionList>
<SectionListItem><SectionLink href="/section-a">Section A</SectionLink></SectionListItem>
<SectionListItem><SectionLink href="/section-b" current>Section B</SectionLink></SectionListItem>
</SectionList>
</SectionNav>
| Prop | Type | Default | Description |
|---|---|---|---|
label | string (required) | — | Accessible label for the navigation landmark |
children | slot (required) | — | The SectionList and its children |
...restProps | HTML attributes | — | Spread onto the root <nav> |
<nav> element is a navigation landmarkaria-label (from label) names the landmarkaria-current="page" should be applied by the consumer to the current SectionLinkBreadcrumbNav for hierarchical position navigationContentsNav for in-page anchor linksNavigationMenu for global site navigationThis headless component renders semantic HTML with appropriate ARIA wiring. The consumer provides all visual styling — no CSS, animations, or layout assumptions are baked in.
The component renders with .section-nav as the root class. No default styles are included.
section-list — list element used inside SectionNavsection-list-item — list itemsection-link — individual linkcontents-nav — in-page anchor navigationbreadcrumb-nav — hierarchical breadcrumb<nav> landmark with aria-label to identify it (e.g. "In this section")SectionList of SectionListItem containing SectionLink childrenSectionList, SectionListItem, SectionLinkrestProps onto the root <nav>Generated from this component's canonical metadata — the machine-checked source the implementations are held to.
<nav> element is a navigation landmarkaria-label (from label) names the landmarkaria-current="page" should be applied by the consumer to the current SectionLinklabel: string (required) (default: —) — Accessible label for the navigation landmarkchildren: slot (required) (default: —) — The SectionList and its children...restProps: HTML attributes (default: —) — Spread onto the root <nav>