Skip to main content

Breadcrumb Component

Figma

The glu-breadcrumb component is a navigation element used to display the current page's location within a hierarchy. When an href is provided, the breadcrumb becomes a clickable link. It also supports customization of the separator via a named slot.


Basic Usage

Example 1: Simple Breadcrumb

Use the breadcrumb as a non-clickable label.

Result
Loading...
Live Editor
<glu-breadcrumb>
  Home
</glu-breadcrumb>

When an href is provided, the component renders as an anchor tag, making it clickable.

Result
Loading...
Live Editor
<glu-breadcrumb href="https://example.com">
  Home
</glu-breadcrumb>

Custom Separator

By default, the breadcrumb displays an arrow icon as a separator. You can customize this by providing your own content for the separator slot.

Result
Loading...
Live Editor
<glu-breadcrumb>
  Home
  <span slot="separator">/</span>
</glu-breadcrumb>

Full Breadcrumb Navigation

To build a complete breadcrumb navigation, combine multiple glu-breadcrumb components within a navigation container.

Result
Loading...
Live Editor
<nav aria-label="breadcrumb" style={{ display: 'flex', alignItems: 'center', gap: '0.75rem' }}>
  <glu-breadcrumb href="/home">Home</glu-breadcrumb>
  <glu-breadcrumb href="/library">Library</glu-breadcrumb>
  <glu-breadcrumb>Data</glu-breadcrumb>
</nav>

Properties

PropertyAttributeDescriptionTypeDefault
hrefhrefOptional URL for the breadcrumb. If provided, the breadcrumb becomes a clickable link.stringundefined

Slots

SlotDescription
The default slot for the breadcrumb label or content.
"separator"An optional slot for customizing the separator between breadcrumb items. Defaults to an glu-icon with name="arrow-right".

Dependencies

Depends on

Graph


Built with StencilJS