SectionNav
A navigation container for section navigation links.
Implementation Notes
- Renders a
<nav>landmark witharia-labelto identify it (e.g. "In this section") - Wraps a
SectionListofSectionListItemcontainingSectionLinkchildren - Companion components:
SectionList,SectionListItem,SectionLink - Spreads
restPropsonto the root<nav>
Props
| 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> |
Usage
<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>
Keyboard Interactions
- Tab moves focus through the contained links
ARIA
<nav>element is a navigation landmarkaria-label(fromlabel) names the landmarkaria-current="page"should be applied by the consumer to the currentSectionLink
When to Use
- Showing a sibling-page menu for a content section (typically rendered as a left-side or top sub-navigation)
When Not to Use
- Use
BreadcrumbNavfor hierarchical position navigation - Use
ContentsNavfor in-page anchor links - Use
NavigationMenufor global site navigation
Headless
This headless component renders semantic HTML with appropriate ARIA wiring. The consumer provides all visual styling — no CSS, animations, or layout assumptions are baked in.
Styles
The component renders with .section-nav as the root class. No default styles are included.
Related components
section-list— list element used insideSectionNavsection-list-item— list itemsection-link— individual linkcontents-nav— in-page anchor navigationbreadcrumb-nav— hierarchical breadcrumb