Breadcrumb

Breadcrumbs provide a group of links so users can easily navigate a website’s hierarchy.

It’s expected that you configure the overflow menu as the first item in the default slot. As you scale down the browser, all Breadcrumb Items except the last one will begin to truncate when the space available to show the Breadcrumb Item becomes limited.
An overflow menu will be shown once the breakpoint is hit. You can see this in action by scalling down the browser to reveal the overflow menu. This breakpoint is configurable via the overflow-size property which has the following three sizes:
  • Small - The overflow menu will be shown at 50rems (800px).
  • Medium (default) - The overflow menu will be shown at 64rems (1024px).
  • Large - The overflow menu will be shown at 90rems (1440px).

Note: We have plans to build the overflow functionality into the Breadcrumb in the future.

By default, breadcrumb items are rendered as buttons so you can use them to navigate single-page applications. In this case, you’ll need to add event listeners to handle clicks.

Procedures Colonoscopy Procedures Colonoscopy Patient

For websites, you’ll probably want to use links instead. You can make any breadcrumb item a link by applying an href attribute to it. Now, when the user activates it, they’ll be taken to the corresponding page — no event listeners required.

import '@ods/components/web.breadcrumb';

Note: You only need to import a web component once in your code, as it registers itself globally when defined, allowing you to use it anywhere within your application without needing to re-import it each time you want to use the component.

Slots

NameDescription
(default)One or more breadcrumb items to display.

Properties

Please note, both DOM properties and HTML attributes are shown in the table below. Unless otherwise specified, the property and attribute names are identical.

Property/AttributeReflectsTypeDefault
label
string''
overflowSize
overflow-size
'small' | 'medium' | 'large''medium'

Parts

NameDescription
baseThe component's base wrapper.

Dependencies

This component automatically imports the following dependencies.

  • ods-dropdown
  • ods-icon
  • ods-popup

Usage

This section includes guidelines for designers and developers about the usage of this component in different contexts.

Do

  • Use breadcrumbs within the Page Header to help orient user
  • Use the same terminology as shown in Side Nav
  • Allow user to navigate backwards through page hierarchy using breadcrumbs

Dont

  • Use breadcrumbs as primary navigation - use Side Nav for this.
  • Use different terms than what is used in primary navigation
  • Change the separator chevron to any other separator icon like slashes

Search