Breadcrumb

@sushindustries/ui

The trail, told twice from one list: a visible nav with correct ARIA, and the schema.org BreadcrumbList rendered from the same array.

5 min read
View as MarkdownEdit on GitHub

Composing it

items should end with the current page, and that last entry should have no href - the component treats any item with no href as the current page, not only the last one, so a stray href on what should be the final crumb turns it back into a link to itself. Root-first order matters for the JSON-LD as well as the visible trail: position in the structured data comes straight from array index.

When not to use it

For a page with no real hierarchy above it - a home page, a one-off landing page - a trail with nothing to show above the current page says nothing useful. BreadcrumbBreadcrumbThe trail, told twice from one list: a visible nav with correct ARIA, and the schema.org BreadcrumbList rendered from the same array.@sushindustries/ui · docs already returns null for zero items, but a single item with no parent to link to is better left out of the page entirely than rendered as a trail of one.

UsesIconIconThe glyph set, generated from a Markdown table where every drawing carries its reason. One component, typed names, no icon font.@sushindustries/ui · content