Skip to content
satin

Breadcrumb

Shows where the page sits and leads back up the path.

Installation

Terminal
npm i @uisatin/ui
Import
import { Breadcrumb } from '@uisatin/ui/breadcrumb'

About 46.6 kB of JavaScript, minified and gzipped, with what it imports (React aside). The stylesheet is one file for every component.

First time with Satin? Set it up once, styles and fonts included, with the installation guide.

API Reference

The Breadcrumb component renders a nav named "Breadcrumb" around an ordered list. The last item is the current page, with aria-current="page" and no link. Folded items open from a menu button.

PropTypeDefault
items
BreadcrumbItem[]
—
item.label
string
—
item.icon
ReactNode
—
item.hideLabel
boolean
false
item.href
string
—
item.onSelect
() => void
—
maxItems
number
—
className
string
—
ref
Ref<HTMLElement>
—
...props
ComponentProps<'nav'>

Other attributes go to <nav>

—

Accessibility

A nav named "Breadcrumb" (aria-label overrides it) around an ordered list. The current page is plain text with aria-current="page". With hideLabel the label stays for screen readers. The separators are hidden. Folded items sit behind a button named "Show 3 more" that opens a menu named "Hidden pages".

KeyAction
EnterorSpaceor↓On the "…" button: opens the menu of hidden pages.
↑or↓Moves between the hidden pages.
EnterorSpaceGoes to the highlighted page.
EscCloses the menu and returns focus to the "…" button.