Breadcrumb
Shows where the current page sits in the hierarchy.
Example
<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>import { Breadcrumb } from '@focsd-dev/react';
export function Example() { return <Breadcrumb>…</Breadcrumb>;}<script setup>import '@focsd-dev/components/focsd-breadcrumb.js';</script>
<template> <focsd-breadcrumb>…</focsd-breadcrumb></template>// Add CUSTOM_ELEMENTS_SCHEMA to the component's schemas, then:import '@focsd-dev/components/focsd-breadcrumb.js';
// template<focsd-breadcrumb>…</focsd-breadcrumb><script> import '@focsd-dev/components/focsd-breadcrumb.js';</script>
<focsd-breadcrumb>…</focsd-breadcrumb>API
Attributes
| Attribute | Property | Type | Default |
|---|---|---|---|
label | label | string | — |
Slots
| Slot | Description |
|---|---|
(default) | Default content. |
CSS parts
Style the inside of the component with ::part(), for example focsd-breadcrumb::part(list).
| Part | Description |
|---|---|
list | The list element. |
nav | The 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.
Ask the docs
Hi, what are you building?
Ask about any component, theming, forms or frameworks. I answer with the right component, a snippet and a link to its docs.