Default
The full trail, when it has 4 steps or fewer and fits on one line.
Shows where a page sits in the site, so people can go back up a level.
Added · New
Breadcrumb
Paste this markup under the header, above the page heading
<nav class="nds-breadcrumb" aria-label="Breadcrumb"> <ol class="nds-breadcrumb__list"> <li class="nds-breadcrumb__item"> <a class="nds-breadcrumb__link" href="/"> Home </a> </li> <li class="nds-breadcrumb__item"> <a class="nds-breadcrumb__link" href="/services"> Services </a> </li> <li class="nds-breadcrumb__item nds-breadcrumb__item--parent"> <a class="nds-breadcrumb__link" href="/services/births-and-deaths"> Births and deaths </a> </li> <li class="nds-breadcrumb__item nds-breadcrumb__item--current" aria-current="page"> Request a copy of a birth certificate </li> </ol></nav> Usage
<!-- wp:nds/breadcrumb {} --><nav class="nds-breadcrumb" aria-label="Breadcrumb"> <ol class="nds-breadcrumb__list"> <li class="nds-breadcrumb__item"> <a class="nds-breadcrumb__link" href="/"> Home </a> </li> <li class="nds-breadcrumb__item"> <a class="nds-breadcrumb__link" href="/services"> Services </a> </li> <li class="nds-breadcrumb__item nds-breadcrumb__item--parent"> <a class="nds-breadcrumb__link" href="/services/births-and-deaths"> Births and deaths </a> </li> <li class="nds-breadcrumb__item nds-breadcrumb__item--current" aria-current="page"> Request a copy of a birth certificate </li> </ol></nav><!-- /wp:nds/breadcrumb --> Usage
import { Breadcrumb } from "@nigerian-design-standards/react";<Breadcrumb items={[ { text: "Home", href: "/" }, { text: "Services", href: "/services" }, { text: "Births and deaths", href: "/services/births-and-deaths" }, ]} current="Request a copy of a birth certificate"/> Usage
use NDS\Components\Breadcrumb;echo Breadcrumb::render([ 'items' => [ ['text' => 'Home', 'href' => '/'], ['text' => 'Services', 'href' => '/services'], ['text' => 'Births and deaths', 'href' => '/services/births-and-deaths'], ], 'current' => 'Request a copy of a birth certificate',]); Put a breadcrumb under the header and above the page heading. It shows the trail of pages from Home to the one people are on, so they can see where they are and go back up a level.
Three versions. Show the full trail when it fits, collapse it when it doesn’t, and use one parent link on mobile.
The full trail, when it has 4 steps or fewer and fits on one line.
Home › … › Current, when the trail is longer or would wrap. … shows the hidden levels.
One ‹ Parent link with a 48px tap area. Best on mobile, where people mostly go up one level.
The properties of the breadcrumb. The same in HTML and React.
| Property | Type | Possible values | Description |
|---|---|---|---|
| items | array |
| Required. One link per level, from Home to the parent page, in order. |
| current | string |
| Required. The page you are on. Shown last, as text, not a link. |
| collapse | string |
| Optional. "auto" collapses to Home › … › Current when the trail has more than 4 steps or would wrap. Defaults to "auto". |
| mobile | string |
| Optional. "parent" shows one ‹ Parent link on small screens. Defaults to "parent". |
In code, the breadcrumb is a <nav aria-label="Breadcrumb"> with an <ol>, one <li> per step. The current page is <li aria-current="page">, as text. Separators are drawn in CSS and
never read out. The … is a <button aria-expanded="false"> that
reveals the hidden levels in place.
| Part | Token | Contrast on the page |
|---|---|---|
| Links | Utility/caption (12px) · text/secondary. Hover: text/primary, underlined | 6.6:1 |
| Current page | Label/small (12px, Medium) · text/primary | 17.6:1 |
| Separator | icon/caret right, 12px (spacing/150) · text/secondary. Decoration only | 6.6:1 |
| … button | Utility/caption · text/secondary · radius/050 | 6.6:1 |
| Spacing | spacing/100 between steps · spacing/050 above and below each step | — |
| Focus | Focus ring (border/focus) · radius/050, keyboard focus only | — |
| Mobile parent | Label/small · 48px tap area (spacing/600) | 17.6:1 |
Collapse a long trail to Home › … › Current. Home stays first and the current page last.
Don’t use a breadcrumb inside a step-by-step form. It shows where a page lives, not where someone has been. Use a back link to the previous step.
Where the breadcrumb goes and how it behaves.
After the skip link and the header, before the page heading and main content.
Home › … › Current, on any screen. … shows the hidden levels in place.
‹ Parent with a 48px tap area, when people mostly go up one level.
Always, including when the trail is collapsed.
How to write the links in the trail.
Not the site name, and not a house icon on its own.
Each link is the title of the page it goes to.
Shorten very long titles in the page metadata, not in the trail.
If a page sits in two places, pick the main one.
Never use it to cut a page title short.
| Write | Don’t write | Why |
|---|---|---|
| Home | Corporate Affairs Commission | Short, and the same on every government site. |
| Births and deaths | Births, deaths and… | Never cut a title with “…”. |
| Request a copy of a birth certificate (text) | Request a copy of a birth certificate (link) | The current page is text. A link to it would go nowhere. |
| ‹ Births and deaths | ‹ Back | Say where the link goes. |
| Services | Click here for services | Use the title of the page. |
The breadcrumb is a named navigation landmark with an ordered list, so screen readers say how deep the page is.
| Key | What it does |
|---|---|
| Tab | Moves through the links and the … button, left to right. The current page and separators are skipped. |
| Shift + Tab | Moves back. |
| Enter | Follows a link. On …, shows the hidden levels and moves focus to the first one. |
Copy the code for HTML, WordPress or React from the Code tab in Live example. The options are listed under Specifications.
Use Breadcrumb from 01 Library – Foundations. Pick Default, Collapsed or Mobile parent, and change the link labels and the current page. Don’t detach it.
Is this page useful?