DocsDocs

Breadcrumbs

The path from the top level to the current page, with earlier levels as links or buttons.

StableSince 1.0.0
On this page

Overview

From the workspace to the open document.

Show code, DocumentTrail.tsx

Variants

Applications without addresses

Levels can be buttons rather than links.

  • Pressing one shortens the trail.
  • The application moves focus, here to the folder's title.
Show code, WithoutUrls.tsx

A level without a page

A level that can't be opened is plain text.

Show code, LevelWithoutPage.tsx

Wrapping

Wraps

A trail above a page's content: it wraps onto more lines when it runs out of room. The default.

One line

A bar that stays one line tall: the current page is cut short first.

Show code, WrappingTrail.tsx
Show code, OneLine.tsx

Anatomy

  1. Trail

  2. Level

  3. Separator

  4. Current page

Show code, BreadcrumbsAnatomy.tsx

Behaviour

Long labels

A long label ends with an ellipsis, and a tooltip shows it in full on hover and on keyboard focus.

  • On one line, the current page is cut short first, and earlier levels keep their width.

Rules

The trail starts where people know the top to be, and names each level as they know it.

Use it when

  • Seeing where you are in a hierarchy and going up, such as the folders above a document
  • An item's place, on one line of a header or a bar beside its status and actions
DoStart at the level people know as the top, such as the workspace.
Show code, RecognisedTop.tsx
Donโ€™tThe address as the trail: a domain and ids people don't know.
Show code, AddressAsTrail.tsx

Names

Name each level as it is named elsewhere, and the current page as the page's heading.

Beside the navigation

Pair the trail with the main navigation: it never replaces it.

  • A trail of one level shows nothing.

Accessibility

KeyAction
Tab, Shift+TabMoves through the links and buttons; a plain level or the current page only when cut short.
EnterFollows a link or presses a button.
SpacePresses a button.