> ## Documentation Index
> Fetch the complete documentation index at: https://www.beeq.design/llms.txt
> Use this file to discover all available pages before exploring further.

# Breadcrumb

> A breadcrumb shows users their current location within a site hierarchy and lets them navigate back through parent levels.

export const CodeLivePreview = ({code, children, height, removePadding = false, mode = 'shadow'}) => {
  const previewRef = useRef(null);
  const BEEQ_VERSION = '1.16.1';
  const BEEQ_ESM_URL = `https://cdn.jsdelivr.net/npm/@beeq/core@${BEEQ_VERSION}/dist/beeq/beeq.esm.min.js`;
  const BEEQ_CSS_URL = `https://cdn.jsdelivr.net/npm/@beeq/core@${BEEQ_VERSION}/dist/beeq/beeq.css`;
  const BEEQ_ICONS_URL = `https://cdn.jsdelivr.net/npm/@beeq/core@${BEEQ_VERSION}/dist/beeq/svg`;
  const ensureParentBeeqRuntime = () => {
    if (document.querySelector('script[data-beeq-parent-runtime]')) return;
    const script = document.createElement('script');
    script.type = 'module';
    script.src = BEEQ_ESM_URL;
    script.dataset.beeqParentRuntime = BEEQ_ICONS_URL;
    document.head.appendChild(script);
  };
  const executeSnippetScripts = (root, runtimeWindow, previewRootArg, skipAttr) => {
    root.querySelectorAll('script').forEach(oldScript => {
      if (skipAttr && oldScript.hasAttribute(skipAttr)) return;
      if (oldScript.src) {
        const newScript = runtimeWindow.document.createElement('script');
        newScript.src = oldScript.src;
        oldScript.replaceWith(newScript);
        return;
      }
      runtimeWindow.Function('previewRoot', oldScript.textContent || '')(previewRootArg);
      oldScript.remove();
    });
  };
  const syncIframeMode = iframeDoc => {
    const root = document.documentElement;
    const explicitMode = root.getAttribute('bq-mode');
    const isDark = root.classList.contains('dark');
    const resolvedMode = explicitMode || (isDark ? 'dark' : 'light');
    iframeDoc.documentElement.setAttribute('bq-mode', resolvedMode);
    iframeDoc.body.setAttribute('bq-mode', resolvedMode);
  };
  useEffect(() => {
    if (mode === 'shadow') ensureParentBeeqRuntime();
  }, [mode]);
  useEffect(() => {
    const container = previewRef.current;
    if (!container) return;
    if (removePadding) container.style.padding = '0';
    container.innerHTML = '';
    if (mode === 'iframe') {
      const iframe = document.createElement('iframe');
      iframe.className = 'preview-iframe';
      iframe.style.width = '100%';
      iframe.style.border = '0';
      iframe.style.display = 'block';
      iframe.style.height = height ?? '';
      iframe.setAttribute('title', 'Live code preview');
      iframe.setAttribute('loading', 'lazy');
      iframe.setAttribute('sandbox', 'allow-scripts allow-same-origin');
      container.appendChild(iframe);
      const iframeDoc = iframe.contentDocument;
      const iframeWin = iframe.contentWindow;
      if (!iframeDoc || !iframeWin) return;
      iframeDoc.open();
      iframeDoc.write(['<!doctype html>', '<html>', '<head>', '  <meta charset="utf-8" />', '  <meta name="viewport" content="width=device-width, initial-scale=1" />', '  <style>html,body{margin:0;padding:0;min-height:100%;}</style>', `  <link rel="stylesheet" href="${BEEQ_CSS_URL}" />`, `  <script type="module" src="${BEEQ_ESM_URL}" data-beeq-iframe-runtime="${BEEQ_ICONS_URL}"></script>`, '</head>', '<body>', code, '</body>', '</html>'].join('\n'));
      iframeDoc.close();
      syncIframeMode(iframeDoc);
      const modeObserver = new MutationObserver(() => syncIframeMode(iframeDoc));
      modeObserver.observe(document.documentElement, {
        attributes: true,
        attributeFilter: ['class', 'bq-mode']
      });
      executeSnippetScripts(iframeDoc, iframeWin, iframeDoc, 'data-beeq-iframe-runtime');
      return () => modeObserver.disconnect();
    }
    const shadowRoot = container.shadowRoot ?? container.attachShadow({
      mode: 'open'
    });
    if (!shadowRoot.adoptedStyleSheets.length) {
      const fixSheet = new CSSStyleSheet();
      fixSheet.replaceSync(`
        bq-dropdown::part(panel),
        bq-panel::part(panel),
        bq-select::part(panel),
        bq-date-picker::part(panel) { z-index: 9999; }
        bq-tooltip::part(panel) { position: absolute; }
      `);
      shadowRoot.adoptedStyleSheets = [fixSheet];
    }
    shadowRoot.innerHTML = [`<link rel="stylesheet" href="${BEEQ_CSS_URL}">`, code].join('');
    executeSnippetScripts(shadowRoot, window, shadowRoot);
    return undefined;
  }, [code, mode, height]);
  return <div className="code-live-preview not-prose">
      {}
      <div className="preview" ref={previewRef} style={{
    minHeight: height
  }} />

      {}
      {children && <div className="code">{children}</div>}
    </div>;
};

export const CardTile = ({title, href, imageLightSrc, imageDarkSrc, children, enableImgZoom}) => {
  if (!href) {
    return <div className="card-tile block font-normal group relative my-2 ring-2 ring-transparent rounded-2xl overflow-hidden w-full">
        {imageLightSrc && <img className="w-full m-0 block dark:hidden" src={imageLightSrc} alt={title} {...enableImgZoom ? {
      zoom: true
    } : {
      noZoom: true
    }} />}
        {imageDarkSrc && <img className="w-full m-0 hidden dark:block" src={imageDarkSrc} alt={title} {...enableImgZoom ? {
      zoom: true
    } : {
      noZoom: true
    }} />}
        {title && <h2 className="mt-4 mb-2 px-6 text-base font-semibold">{title}</h2>}
        <div className="px-6 pb-5">{children}</div>
      </div>;
  }
  return <a href={href} className="card-tile block font-normal group relative my-2 ring-2 ring-transparent rounded-2xl overflow-hidden w-full cursor-pointer">
      {imageLightSrc && <img className="w-full m-0 block dark:hidden" src={imageLightSrc} alt={title} noZoom />}
      {imageDarkSrc && <img className="w-full m-0 hidden dark:block" src={imageDarkSrc} alt={title} noZoom />}
      {title && <h2 className="mt-4 mb-2 px-6 text-base font-semibold">{title}</h2>}
      <div className="px-6 pb-5">{children}</div>
    </a>;
};

<Frame className="px-4 py-4" caption="Breadcrumb component overview">
  <img className="block dark:hidden" src="https://mintcdn.com/beeq/q2QfdaQVx7Z_gV2t/components/images/breadcrumb/breadcrumb-overview-light.svg?fit=max&auto=format&n=q2QfdaQVx7Z_gV2t&q=85&s=1cb6e9eaed2f5aeed68d9d71909a3df6" alt="BEEQ Breadcrumb component overview" width="242" height="93" data-path="components/images/breadcrumb/breadcrumb-overview-light.svg" />

  <img className="hidden dark:block" src="https://mintcdn.com/beeq/q2QfdaQVx7Z_gV2t/components/images/breadcrumb/breadcrumb-overview-dark.svg?fit=max&auto=format&n=q2QfdaQVx7Z_gV2t&q=85&s=cc9ca8e405c1c1cb54cb937278805cdb" alt="BEEQ Breadcrumb component overview" width="242" height="93" data-path="components/images/breadcrumb/breadcrumb-overview-dark.svg" />
</Frame>

A breadcrumb is a form of contextual navigation displaying a user's position within a site hierarchy, enabling them to navigate back through the levels, while it should not be misleading as a primary navigation tool.

## When to use

<CardGroup cols={2}>
  <Card>
    <span className="flex items-center mr-2 text-lg font-medium" role="heading">
      <Icon className="mr-2" icon="thumbs-up" iconType="solid" size={20} color="var(--bq-stroke--success)" />

      Use breadcrumbs when
    </span>

    * Navigating large content hierarchies with more than two levels
    * Users need compact context for where they are in the navigation hierarchy
    * Users need to move back through parent levels from the current page
  </Card>

  <Card>
    <span className="flex items-center mr-2 text-lg font-medium" role="heading">
      <Icon className="mr-2" icon="thumbs-down" iconType="solid" size={20} color="var(--bq-stroke--danger)" />

      Do not use breadcrumbs when
    </span>

    * They would substitute the primary navigation
    * The product has single-level navigation and breadcrumbs would add unnecessary clutter
    * The user is in a multistep process; use a progress indicator instead
  </Card>
</CardGroup>

## Anatomy

<Frame className="px-4 py-4" caption="Breadcrumb component anatomy">
  <img className="block dark:hidden" src="https://mintcdn.com/beeq/q2QfdaQVx7Z_gV2t/components/images/breadcrumb/breadcrumb-anatomy-light.svg?fit=max&auto=format&n=q2QfdaQVx7Z_gV2t&q=85&s=84564ed30942e558a69b50556724312f" alt="BEEQ Breadcrumb component anatomy" width="452" height="138" data-path="components/images/breadcrumb/breadcrumb-anatomy-light.svg" />

  <img className="hidden dark:block" src="https://mintcdn.com/beeq/q2QfdaQVx7Z_gV2t/components/images/breadcrumb/breadcrumb-anatomy-dark.svg?fit=max&auto=format&n=q2QfdaQVx7Z_gV2t&q=85&s=14c839966b459e25704eff0c605f178a" alt="BEEQ Breadcrumb component anatomy" width="452" height="138" data-path="components/images/breadcrumb/breadcrumb-anatomy-dark.svg" />
</Frame>

| Part | Element | Description |
| - | - | - |
| Icon | `bq-icon` or decorative icon | Optional visual cue before the first breadcrumb item |
| Divider | `separator` slot | The default slash separator or a custom separator element |
| Inactive breadcrumb | `bq-breadcrumb-item` | A parent navigation step rendered as a link or button |
| Current page | `bq-breadcrumb-item` with `aria-current="page"` | The last item indicating the user’s current location |
| Truncation | custom overflow or hidden items | Collapses long paths while preserving the first and last items |
| Dropdown | custom nested menu | Optional overflow menu for deep breadcrumb trails |

## Design guidelines

### Placement

Breadcrumbs should appear near the top of the page, above the page title or directly below the page header.

<CardGroup cols={2}>
  <CardTile title="Position option 1" imageLightSrc="/components/images/breadcrumb/breadcrumb-placement-1-light.svg" imageDarkSrc="/components/images/breadcrumb/breadcrumb-placement-1-dark.svg">
    Place breadcrumbs directly above the page title when the header contains navigation or actions.
  </CardTile>

  <CardTile title="Position option 2" imageLightSrc="/components/images/breadcrumb/breadcrumb-placement-2-light.svg" imageDarkSrc="/components/images/breadcrumb/breadcrumb-placement-2-dark.svg">
    Place breadcrumbs below the page header when an additional top bar or contextual toolbar is present.
  </CardTile>
</CardGroup>

### Label and icon

<CardGroup cols={2}>
  <CardTile title="With icon" imageLightSrc="/components/images/breadcrumb/breadcrumb-label-icon-light.svg" imageDarkSrc="/components/images/breadcrumb/breadcrumb-label-icon-dark.svg">
    Use small icons (`size="16"`) paired with a text label to aid recognition. Never use an icon alone without a text label or an icon `label`.
  </CardTile>

  <CardTile title="Text only" imageLightSrc="/components/images/breadcrumb/breadcrumb-label-text-light.svg" imageDarkSrc="/components/images/breadcrumb/breadcrumb-label-text-dark.svg">
    Text-only labels work well in compact spaces or minimal interfaces. Keep labels short and match the destination page title exactly.
  </CardTile>
</CardGroup>

### States

All parent breadcrumb items share the same brand primary color. Each interactive state provides a distinct visual cue:

| State | Visual treatment |
| - | - |
| **Default** | Brand primary color text, no decoration |
| **Hover** | Text color changes to the brand hover color to signal interactivity |
| **Focus** | Visible focus ring around the item |
| **Active** | `:active` pressed appearance |
| **Current page** | Secondary text color (`--bq-breadcrumb-item--text-color-current`); `aria-current="page"` is set automatically |

### Sizing and spacing

Breadcrumb items use consistent internal padding and separator spacing controlled by CSS custom properties. You can adjust these tokens when integrating the breadcrumb into a custom page header:

* `--bq-breadcrumb-item--paddingY` — vertical padding of each item
* `--bq-breadcrumb-item--padding-start` / `--bq-breadcrumb-item--padding-end` — horizontal padding of each item
* `--bq-breadcrumb-item--padding-start-separator` / `--bq-breadcrumb-item--padding-end-separator` — spacing around the separator

### Truncation

<Note>
  Show a maximum of four items in the breadcrumb trail. When the path is deeper, keep the first (root) and last (current page) items visible and collapse the intermediate levels into a dropdown so users can still reach any level.
</Note>

## Usage

The examples below cover the most common ways to use breadcrumbs in BEEQ.

### Default

Use a default breadcrumb to show the current page within a hierarchy. When `href` is not set, each breadcrumb item renders as a button.

<Note>
  Always place `bq-breadcrumb-item` elements directly inside `bq-breadcrumb`. Items rendered outside the component will not receive separator or `aria-current` handling.
</Note>

<CodeLivePreview
  mode="shadow"
  code={`
<bq-breadcrumb label="Breadcrumb">
<bq-breadcrumb-item>Home</bq-breadcrumb-item>
<bq-breadcrumb-item>Men's clothing</bq-breadcrumb-item>
<bq-breadcrumb-item>Shirt</bq-breadcrumb-item>
<bq-breadcrumb-item>Casual shirts</bq-breadcrumb-item>
</bq-breadcrumb>
`}
>
  <CodeGroup>
    ```html HTML icon="html5" theme={"theme":{"light":"one-light","dark":"night-owl"}}
    <bq-breadcrumb label="Breadcrumb">
      <bq-breadcrumb-item>Home</bq-breadcrumb-item>
      <bq-breadcrumb-item>Men's clothing</bq-breadcrumb-item>
      <bq-breadcrumb-item>Shirt</bq-breadcrumb-item>
      <bq-breadcrumb-item>Casual shirts</bq-breadcrumb-item>
    </bq-breadcrumb>
    ```

    ```jsx React icon="react" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
    import { BqBreadcrumb, BqBreadcrumbItem } from "@beeq/react";

    <BqBreadcrumb label="Breadcrumb">
      <BqBreadcrumbItem>Home</BqBreadcrumbItem>
      <BqBreadcrumbItem>Men's clothing</BqBreadcrumbItem>
      <BqBreadcrumbItem>Shirt</BqBreadcrumbItem>
      <BqBreadcrumbItem>Casual shirts</BqBreadcrumbItem>
    </BqBreadcrumb>
    ```

    ```ts Angular icon="angular" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
    import { Component } from "@angular/core";
    import { BqBreadcrumb, BqBreadcrumbItem } from "@beeq/angular/standalone";

    @Component({
      selector: "app-root",
      standalone: true,
      imports: [BqBreadcrumb, BqBreadcrumbItem],
      template: `
        <bq-breadcrumb label="Breadcrumb">
          <bq-breadcrumb-item>Home</bq-breadcrumb-item>
          <bq-breadcrumb-item>Men's clothing</bq-breadcrumb-item>
          <bq-breadcrumb-item>Shirt</bq-breadcrumb-item>
          <bq-breadcrumb-item>Casual shirts</bq-breadcrumb-item>
        </bq-breadcrumb>
      `,
    })
    export class AppComponent {}
    ```

    ```vue Vue icon="vuejs" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
    <script setup lang="ts">
    import { BqBreadcrumb, BqBreadcrumbItem } from "@beeq/vue";
    </script>

    <template>
      <BqBreadcrumb label="Breadcrumb">
        <BqBreadcrumbItem>Home</BqBreadcrumbItem>
        <BqBreadcrumbItem>Men's clothing</BqBreadcrumbItem>
        <BqBreadcrumbItem>Shirt</BqBreadcrumbItem>
        <BqBreadcrumbItem>Casual shirts</BqBreadcrumbItem>
      </BqBreadcrumb>
    </template>
    ```
  </CodeGroup>
</CodeLivePreview>

### Custom separator

Use the `separator` slot to replace the default `/` separator.

<CodeLivePreview
  mode="shadow"
  code={`
<bq-breadcrumb label="Breadcrumb">
<bq-icon name="caret-right" size="12" slot="separator"></bq-icon>
<bq-breadcrumb-item href="/">Home</bq-breadcrumb-item>
<bq-breadcrumb-item href="/components">Catalog</bq-breadcrumb-item>
<bq-breadcrumb-item>Casual shirts</bq-breadcrumb-item>
</bq-breadcrumb>
`}
>
  <CodeGroup>
    ```html HTML icon="html5" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
      <bq-breadcrumb label="Breadcrumb">
        <bq-icon slot="separator" name="caret-right" size="12"></bq-icon>
        <bq-breadcrumb-item href="/">Home</bq-breadcrumb-item>
        <bq-breadcrumb-item href="/components">Catalog</bq-breadcrumb-item>
        <bq-breadcrumb-item>Casual shirts</bq-breadcrumb-item>
      </bq-breadcrumb>
    ```

    ```jsx React icon="react" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
    import { BqBreadcrumb, BqBreadcrumbItem, BqIcon } from "@beeq/react";

    <BqBreadcrumb label="Breadcrumb">
      <BqIcon name="caret-right" size="12" slot="separator" />
      <BqBreadcrumbItem href="/">Home</BqBreadcrumbItem>
      <BqBreadcrumbItem href="/components">Catalog</BqBreadcrumbItem>
      <BqBreadcrumbItem>Casual shirts</BqBreadcrumbItem>
    </BqBreadcrumb>
    ```

    ```ts Angular icon="angular" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
    import { Component } from "@angular/core";
    import { BqBreadcrumb, BqIcon, BqBreadcrumbItem } from "@beeq/angular/standalone";

    @Component({
      selector: "app-root",
      standalone: true,
      imports: [BqBreadcrumb, BqIcon, BqBreadcrumbItem],
      template: `
        <bq-breadcrumb label="Breadcrumb">
          <bq-icon name="caret-right" size="12" slot="separator"></bq-icon>
          <bq-breadcrumb-item href="/">Home</bq-breadcrumb-item>
          <bq-breadcrumb-item href="/components">Catalog</bq-breadcrumb-item>
          <bq-breadcrumb-item>Casual shirts</bq-breadcrumb-item>
        </bq-breadcrumb>
      `,
    })
    export class AppComponent {}
    ```

    ```vue Vue icon="vuejs" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
    <script setup lang="ts">
    import { BqBreadcrumb, BqBreadcrumbItem, BqIcon } from "@beeq/vue";
    </script>

    <template>
      <BqBreadcrumb label="Breadcrumb">
        <BqIcon name="caret-right" size="12" slot="separator" />
        <BqBreadcrumbItem href="/">Home</BqBreadcrumbItem>
        <BqBreadcrumbItem href="/components">Catalog</BqBreadcrumbItem>
        <BqBreadcrumbItem>Casual shirts</BqBreadcrumbItem>
      </BqBreadcrumb>
    </template>
    ```
  </CodeGroup>
</CodeLivePreview>

<Note>
  Use the same separator throughout a breadcrumb trail. Mixing separator styles in a single trail breaks visual consistency.
</Note>

### Intercepting navigation

When a `bq-breadcrumb-item` has an `href`, activating it navigates to that URL. The `bqClick` event is cancelable: call `event.preventDefault()` on the event to stop the browser from following the link. Use this to route through a client-side router, prompt the user before leaving an unsaved form, or run analytics before navigating.

```html HTML icon="html5" theme={"theme":{"light":"one-light","dark":"night-owl"}}
<bq-breadcrumb label="Breadcrumb">
  <bq-breadcrumb-item href="/">Home</bq-breadcrumb-item>
  <bq-breadcrumb-item href="/catalog">Catalog</bq-breadcrumb-item>
  <bq-breadcrumb-item>Casual shirts</bq-breadcrumb-item>
</bq-breadcrumb>

<script>
  document.querySelector("bq-breadcrumb").addEventListener("bqClick", (event) => {
    // Stop the default link navigation and hand control to your router
    event.preventDefault();
    const href = event.target.getAttribute("href");
    if (href) router.push(href);
  });
</script>
```

## Options

The following example shows how to combine icons with breadcrumb items.

### With icons

Icons next to labels help users recognize categories at a glance. Use `size="16"` icons and always pair them with a text label or set `label` on the icon for screen reader clarity.

<CodeLivePreview
  mode="shadow"
  code={`
<bq-breadcrumb label="Breadcrumb">
<bq-breadcrumb-item>
  <bq-icon name="house-line" size="16" label="Home page"></bq-icon>
</bq-breadcrumb-item>
<bq-breadcrumb-item>
  <bq-icon name="shirt-folded" size="16"></bq-icon>
  Men's Clothing
</bq-breadcrumb-item>
<bq-breadcrumb-item>Casual shirts</bq-breadcrumb-item>
</bq-breadcrumb>
`}
>
  <CodeGroup>
    ```html HTML icon="html5" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
    <bq-breadcrumb label="Breadcrumb">
      <bq-breadcrumb-item>
        <bq-icon name="house-line" size="16" label="Home page"></bq-icon>
      </bq-breadcrumb-item>
      <bq-breadcrumb-item>
        <bq-icon name="shirt-folded" size="16"></bq-icon>
        Men's Clothing
      </bq-breadcrumb-item>
      <bq-breadcrumb-item>Casual shirts</bq-breadcrumb-item>
    </bq-breadcrumb>
    ```

    ```jsx React icon="react" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
    import { BqBreadcrumb, BqBreadcrumbItem, BqIcon } from "@beeq/react";

    <BqBreadcrumb label="Breadcrumb">
      <BqBreadcrumbItem>
        <BqIcon name="house-line" size="16" label="Home page" />
      </BqBreadcrumbItem>
      <BqBreadcrumbItem>
        <BqIcon name="shirt-folded" size="16" />
        Men's Clothing
      </BqBreadcrumbItem>
      <BqBreadcrumbItem>Casual shirts</BqBreadcrumbItem>
    </BqBreadcrumb>
    ```

    ```ts Angular icon="angular" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
    import { Component } from "@angular/core";
    import { BqBreadcrumb, BqBreadcrumbItem, BqIcon } from "@beeq/angular/standalone";

    @Component({
      selector: "app-root",
      standalone: true,
      imports: [BqBreadcrumb, BqBreadcrumbItem, BqIcon],
      template: `
        <bq-breadcrumb label="Breadcrumb">
          <bq-breadcrumb-item>
            <bq-icon name="house-line" size="16" label="Home page"></bq-icon>
          </bq-breadcrumb-item>
          <bq-breadcrumb-item>
            <bq-icon name="shirt-folded" size="16"></bq-icon>
            Men's Clothing
          </bq-breadcrumb-item>
          <bq-breadcrumb-item>Casual shirts</bq-breadcrumb-item>
        </bq-breadcrumb>
      `,
    })
    export class AppComponent {}
    ```

    ```vue Vue icon="vuejs" expandable theme={"theme":{"light":"one-light","dark":"night-owl"}}
    <script setup lang="ts">
    import { BqBreadcrumb, BqBreadcrumbItem, BqIcon } from "@beeq/vue";
    </script>

    <template>
      <BqBreadcrumb label="Breadcrumb">
        <BqBreadcrumbItem>
          <BqIcon name="house-line" size="16" label="Home page" />
        </BqBreadcrumbItem>
        <BqBreadcrumbItem>
          <BqIcon name="shirt-folded" size="16" />
          Men's Clothing
        </BqBreadcrumbItem>
        <BqBreadcrumbItem>Casual shirts</BqBreadcrumbItem>
      </BqBreadcrumb>
    </template>
    ```
  </CodeGroup>
</CodeLivePreview>

## Best practices

<CardGroup cols={2}>
  <Card>
    <span className="flex items-center mr-2 text-lg font-medium" role="heading">
      <Icon className="mr-2" icon="check" iconType="solid" size={20} color="var(--bq-stroke--success)" />

      Do
    </span>

    For breadcrumbs on detail pages, include the page type (Create, Edit, View) followed by the item name.
  </Card>

  <Card>
    <span className="flex items-center mr-2 text-lg font-medium" role="heading">
      <Icon className="mr-2" icon="xmark" iconType="solid" size={20} color="var(--bq-stroke--danger)" />

      Don't
    </span>

    Avoid indicating the item number or using dynamically generated names without context.
  </Card>

  <Card>
    <span className="flex items-center mr-2 text-lg font-medium" role="heading">
      <Icon className="mr-2" icon="check" iconType="solid" size={20} color="var(--bq-stroke--success)" />

      Do
    </span>

    Truncate labels longer than 30 characters with an ellipsis and show the full text in a tooltip on hover.
  </Card>

  <Card>
    <span className="flex items-center mr-2 text-lg font-medium" role="heading">
      <Icon className="mr-2" icon="xmark" iconType="solid" size={20} color="var(--bq-stroke--danger)" />

      Don't
    </span>

    Display overly long labels that wrap or truncate without a way to view the complete text.
  </Card>

  <Card>
    <span className="flex items-center mr-2 text-lg font-medium" role="heading">
      <Icon className="mr-2" icon="check" iconType="solid" size={20} color="var(--bq-stroke--success)" />

      Do
    </span>

    Show a maximum of four items in the breadcrumb trail. For longer paths, truncate and show the first and last items.
  </Card>

  <Card>
    <span className="flex items-center mr-2 text-lg font-medium" role="heading">
      <Icon className="mr-2" icon="xmark" iconType="solid" size={20} color="var(--bq-stroke--danger)" />

      Don't
    </span>

    Display more than four items in a single breadcrumb trail, as it overloads the visual and reduces usability.
  </Card>

  <Card>
    <span className="flex items-center mr-2 text-lg font-medium" role="heading">
      <Icon className="mr-2" icon="check" iconType="solid" size={20} color="var(--bq-stroke--success)" />

      Do
    </span>

    Make all parent breadcrumb items clickable links, including the current page as the last non-interactive item.
  </Card>

  <Card>
    <span className="flex items-center mr-2 text-lg font-medium" role="heading">
      <Icon className="mr-2" icon="xmark" iconType="solid" size={20} color="var(--bq-stroke--danger)" />

      Don't
    </span>

    Display the current page as a clickable link; it should be non-interactive text to reflect the user's current location.
  </Card>
</CardGroup>

## Accessibility

* **Navigation** — navigate to each link in the breadcrumb using <kbd>Tab</kbd> and activate it with <kbd>Enter</kbd>.
* **Landmark label** — use the `label` prop to set an `aria-label` on the `<nav>` landmark. The default value is `Breadcrumbs`; override it when multiple navigation regions exist on the same page.
* **Current page** — the last breadcrumb item receives `aria-current="page"` automatically.
* **Icon-only items** — when a breadcrumb item contains only an icon, set `label` on the `bq-icon` to describe the destination (e.g. `<bq-icon name="house-line" label="Home page">`). The item does not forward an `aria-label` set on `bq-breadcrumb-item` to its inner link or button.
* **Decorative icons** — when an icon appears alongside a visible text label, set `aria-hidden="true"` on the `bq-icon` so screen readers do not announce it twice.

## API reference

### `bq-breadcrumb` properties

| Property | Attribute | Description | Type | Default |
| - | - | - | - | - |
| `label` | `label` | The `aria-label` attribute to describe the type of navigation | `string` | `'Breadcrumbs'` |

### `bq-breadcrumb-item` properties

| Property | Attribute | Description | Type | Default |
| - | - | - | - | - |
| `href` | `href` | If set, the breadcrumb item will be rendered as an `<a>` with this `href`, otherwise, a `<button>` will be rendered | `string` | `undefined` |
| `rel` | `rel` | Link relationships. Currently not forwarded to the native anchor | `string` | `'noreferrer noopener'` |
| `target` | `target` | Where to display the link in the browser context. Relevant only if `href` is set | `'_blank'` \| `'_parent'` \| `'_self'` \| `'_top'` | `undefined` |

<Warning>
  `bq-breadcrumb-item` currently ignores custom `rel` values. Its inner link uses `rel="noreferrer noopener"` when `target` is set, and no `rel` otherwise. This behavior is tracked in [the Breadcrumb follow-up issue](https://github.com/Endava/BEEQ/issues/1829).
</Warning>

### Events

Events are emitted by `bq-breadcrumb-item`.

| Event | Description | Type | Cancelable |
| - | - | - | - |
| `bqBlur` | Handler to be called when item loses focus | `CustomEvent<HTMLBqBreadcrumbItemElement>` | No |
| `bqClick` | Handler to be called when item is clicked. Call `event.preventDefault()` to stop the underlying link navigation when the item is rendered as an `<a>` | `CustomEvent<HTMLBqBreadcrumbItemElement>` | Yes |
| `bqFocus` | Handler to be called when item is focused | `CustomEvent<HTMLBqBreadcrumbItemElement>` | No |

### Slots

#### `bq-breadcrumb`

| Slot | Description |
| - | - |
| *(default)* | The default slot is used to add `bq-breadcrumb-item` items to the breadcrumb |
| `separator` | The slot to add a separator between breadcrumb items. Default separator is `/` |

#### `bq-breadcrumb-item`

| Slot | Description |
| - | - |
| *(default)* | The default slot is used to add content to the breadcrumb item |
| `separator` | Per-item separator content, normally populated by `bq-breadcrumb`. Use the parent component's `separator` slot for a consistent trail-wide separator |

### Shadow parts

#### `bq-breadcrumb`

| Part | Description |
| - | - |
| `navigation` | The `nav` tag that loads the breadcrumb items |
| `separator` | The container that wraps the separator element |

#### `bq-breadcrumb-item`

| Part | Description |
| - | - |
| `base` | The component wrapper container |
| `content` | The `span` tag that wraps the content item |
| `item` | The breadcrumb item wrapper (`button` or `a`) |
| `separator` | The `span` tag that wraps the separator element |

### CSS custom properties

<Expandable title="CSS variables" defaultOpen={true}>
  | Variable | Description | Default |
  | - | - | - |
  | `--bq-breadcrumb-item--background` | Background color of the breadcrumb item | `transparent` |
  | `--bq-breadcrumb-item--box-shadow` | Box shadow of the breadcrumb item | `none` |
  | `--bq-breadcrumb-item--border-color` | Border color of the breadcrumb item | `transparent` |
  | `--bq-breadcrumb-item--border-style` | Border style of the breadcrumb item | `none` |
  | `--bq-breadcrumb-item--border-width` | Border width of the breadcrumb item | `var(--bq-stroke-s)` |
  | `--bq-breadcrumb-item--border-radius` | Border radius of the breadcrumb item | `var(--bq-radius--s)` |
  | `--bq-breadcrumb-item--line-height` | Line height of the breadcrumb item | `var(--bq-font-line-height--regular)` |
  | `--bq-breadcrumb-item--text-color` | Text color of the breadcrumb item | `var(--bq-text--brand)` |
  | `--bq-breadcrumb-item--text-color-current` | Text color of the current breadcrumb item | `var(--bq-text--secondary)` |
  | `--bq-breadcrumb-item--text-size` | Text size of the breadcrumb item | `var(--bq-font-size--s)` |
  | `--bq-breadcrumb-item--text-size-separator` | Text size of the breadcrumb item separator | `var(--bq-font-size--xs)` |
  | `--bq-breadcrumb-item--separator-color` | Color of the breadcrumb item separator | `var(--bq-ui--tertiary)` |
  | `--bq-breadcrumb-item--padding-start` | Padding start of the breadcrumb item | `var(--bq-spacing-xs2)` |
  | `--bq-breadcrumb-item--padding-end` | Padding end of the breadcrumb item | `var(--bq-spacing-xs2)` |
  | `--bq-breadcrumb-item--paddingY` | Padding top and bottom of the breadcrumb item | `var(--bq-spacing-xs)` |
  | `--bq-breadcrumb-item--padding-start-separator` | Padding start of the breadcrumb item separator | `var(--bq-spacing-xs2)` |
  | `--bq-breadcrumb-item--padding-end-separator` | Padding end of the breadcrumb item separator | `var(--bq-spacing-xs2)` |
</Expandable>

<Tip>
  Learn more about [styling with shadow parts](/guides/styles#component-shadow-dom-parts) and [CSS custom properties](/guides/styles#global-css-custom-properties).
</Tip>

## Resources

<CardGroup cols={2}>
  <Card horizontal title="Interactive playground" icon="code" href="https://storybook.beeq.design/?path=/story/components-breadcrumb--default">
    Explore all breadcrumb configurations in Storybook
  </Card>

  <Card horizontal title="Source code" icon="github" href="https://github.com/Endava/BEEQ/tree/main/packages/beeq/src/components/breadcrumb">
    View the breadcrumb implementation on GitHub
  </Card>
</CardGroup>


## Related topics

- [Changelog](/releases/changelog.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.