Breadcrumbs
The trail that says where the current page sits in the hierarchy, and gives a way back up it.
import from ~/components/ui/breadcrumbs
Two levels
items
The shortest useful trail: one ancestor plus the current page.
Four levels
deep trail
Every ancestor is a link. The last crumb is plain text with aria-current='page', so a screen reader announces the position, not just the list.
Collapsing a long trail
maxItems (default 4)
Six crumbs, folded to four. The root survives because it is the way out, and the last survives because it is where you are.
The folded crumbs are still announced
announced: "2 more: Work, Studio"
sr-only, not aria-label
Collapsing is a visual decision, not a loss of information. A screen reader still hears the crumbs that were folded out.
Never collapse
maxItems={0}
For the rare trail where the full path IS the content, such as a file path. Everything renders, and a long one will wrap.
Rules
Do
Don't