# Breadcrumb

Shows where the user is in the page hierarchy and lets them go back up, on a single row.

Tabs: [Guidelines](/components/web/breadcrumb/breadcrumb.guidelines.md) · [Code](/components/web/breadcrumb/breadcrumb.code.md)

View more in [storybook](https://telescope.pleo.io/storybook/?path=/story/breadcrumb--basic)

```tsx
<Breadcrumb aria-label="Breadcrumb">
    <Breadcrumb.Item href="#">Settings</Breadcrumb.Item>
    <Breadcrumb.Item href="#">People &amp; access</Breadcrumb.Item>
    <Breadcrumb.Item>Single sign-on</Breadcrumb.Item>
</Breadcrumb>
```

## When to use

Use Breadcrumb to show where the user is in a page hierarchy and to let them go back up to a parent page. For example, a page for configuring single sign-on sits under Settings and People & access.

Don't use it as the primary navigation or to show progress through a flow. Use [Tabs](https://telescope.pleo.io/components/web/tabs/tabs.guidelines) to switch between views at the same level and [Steps](https://telescope.pleo.io/components/web/steps/steps.guidelines) for progress through a sequence.

***

## Levels

A trail has at least two levels: the root and the current page. Don't show a breadcrumb for a single page. The trail is ordered from the root to the current page, and the last item is always the current page. It is plain text, not a link, because the user is already there.

***

## Collapsing

The trail always stays on one row. When it does not fit, the first item and the last two (the parent and the current page) stay visible, and every item between them collapses into a "…" menu. At most four items are visible: the root, the "…" menu, the parent and the current page. Trails deeper than four levels always show this collapsed version, so keep hierarchies as shallow as you can.

If the trail still does not fit, labels are truncated with an ellipsis, starting with the current page. The full label is shown in a tooltip on hover and keyboard focus, and the page's own heading should repeat the full name of the current page.

***

## Best practices

### Labels

- **Do:** Use the same names as the page titles, kept short, such as "People & access".
- **Don't:** Use long sentences or labels that differ from the title of the page they lead to.

### Separators

- **Do:** Leave the "/" separators to the component. They are decoration only and are not read out by screen readers.
- **Don't:** Add your own separators or icons to the items.

### Placement

- **Do:** Place the breadcrumb above the page title, aligned with the page content.
- **Don't:** Repeat the breadcrumb elsewhere on the page or use it as a replacement for a back button.

***

## Accessibility

- The trail is a navigation landmark with its own accessible name, for example "Breadcrumb". Give it a translated name.
- The current page is marked with `aria-current="page"`.
- Separators are hidden from assistive technology.
- The "…" button has an accessible name, announces whether its menu is open, and opens with Enter or Space. Arrow keys move through the hidden pages, and Escape closes the menu and returns focus to the button.
- Text meets the 4.5:1 contrast ratio and the focus ring the 3:1 ratio. Items and the "…" button are at least 24 by 24 pixels.
- The trail reflows without scrolling sideways, including at 320 pixels wide and 400% zoom.

[View in Figma](https://www.figma.com/design/XrMR1KTDyuhoAAQM6To84r/Re-brand-%F0%9F%94%AD-Web-Components---Telescope?node-id=49153-39607)[View on Github](https://github.com/pleo-io/web/tree/main/published-packages/telescope-components/src/components/breadcrumb)[Open in Storybook](https://telescope.pleo.io/storybook/?path=/story/breadcrumb--basic)[View metrics](https://telescope-observatory.dev.pleo.io/)
