Skip to main content

Design system components

WorkNav

Work section sub-navigation: a back-to-index action plus previous/next controls for stepping through the portfolio case studies.

Status: stable. Group: navigation. Markdown version: /design-system/components/work-nav.md

When to use

Sub-navigation for the work section. Renders a back-to-work action and previous/next controls that step through the case-study sequence, disabling the edges. The controls are buttons that navigate through router.push (or onNavigate), not links. Portfolio chrome; site-wide nav lives in SiteHeader.

When not to use

  • Do not hardcode a second project sequence in an application wrapper; pass the live ordered pages collection.
  • Do not use WorkNav outside portfolio case-study chrome.

Look-alikes

The contract names no look-alike with a deciding condition.

Props

WorkNav props
PropTypeDefaultDescriptionRequired
currentPathstringnoneActive route used to compute the prev/next disabled state. Defaults to the current pathname from the router; stories and tests override it to show a given position in the work sequence.No
pagesreadonly WorkNavPage[]noneOrdered case-study paths. Defaults to the published project catalog in its display order.No
onNavigate(path: string) => voidnoneHost navigation callback. Defaults to the configured navigation runtime.No
disabledbooleanfalseDisables every action while host navigation is pending. Defaults to false.No

Variants

No variant dimensions and no props with a fixed set of values.

Invalid combinations

The contract records no invalid combinations.

Keyboard

The contract records no keyboard interaction.

Rules

Every item under When not to use is a MUST NOT. MUST and SHOULD follow RFC 2119.

WorkNav rules
LevelRuleHow it is checked
MUSTARIA: Wrapped in a nav landmark labelled via aria-label (workNavLabel)Not yet verified: no evidence record. WCAG 4.1.2.
MUSTARIA: Each Button's icon is decorative (aria-hidden), so the visible label, or the visually clipped label at narrow widths, is the only accessible name and is announced once.Not yet verified: no evidence record. WCAG 4.1.2.
MUSTARIA: The controls are buttons that call router.push (or onNavigate), not links: they announce as buttons inside the nav landmark and cannot be opened in a new tab.Not yet verified: no evidence record. WCAG 4.1.2.
MUSTRequired stories produce no axe violations at the configured severity.Automated by npm run test:stories:matrix:ci. WCAG 2.5.8.
MUSTThe accessibility tree (role, name, state) matches the committed snapshot for every required story.Automated by npm run test:stories:matrix:ci. WCAG 1.3.1, 4.1.2.
MUSTThe component remains legible and operable under a real browser forced-colors: active pass.Automated by npm run test:stories:hc.
MUSTA human completed an end-to-end accessibility review of this component.Manual review, last on 2026-11-04.
SHOULDPass the ordered project registry so navigation stays synchronized with published work.Not stated in the contract.
SHOULDUse onNavigate when the host needs prefetching, transitions, or navigation deduplication.Not stated in the contract.
SHOULD NOTDo not infer a next project for an unknown route; both adjacent controls intentionally disable.Not stated in the contract.

Install and import

  • In-repo only. WorkNav is not exported from @digitaltableteur/react, so there is no public import path.