Skip to content
Focsd homeFocsd homeFocsd
Forms

Breadcrumb

Shows where the current page sits in the hierarchy.

  • Tag: focsd-breadcrumb
  • Pattern: Breadcrumb
  • Category: Navigation

Example

Home Projects Atlas
HTML
<focsd-breadcrumb>
<focsd-breadcrumb-item href="#">Home</focsd-breadcrumb-item>
<focsd-breadcrumb-item href="#">Projects</focsd-breadcrumb-item>
<focsd-breadcrumb-item current>Atlas</focsd-breadcrumb-item>
</focsd-breadcrumb>

Usage

Import the module once, then use the tag like any HTML element. Every framework below renders the same element; see Frameworks for setup.

<script type="module">
import '@focsd-dev/components/focsd-breadcrumb.js';
</script>
<focsd-breadcrumb>…</focsd-breadcrumb>

API

Attributes

AttributePropertyTypeDefault
labellabelstring—

Slots

SlotDescription
(default)Default content.

CSS parts

Style the inside of the component with ::part(), for example focsd-breadcrumb::part(list).

PartDescription
listThe list element.
navThe nav element.

Accessibility

  • A <nav aria-label="Breadcrumb"> landmark around an ordered list.
  • The current item has aria-current="page" and is plain text; separators are hidden from screen readers.