Skip to content

Breadcrumb

A breadcrumbs is a list of links that help visualize the location of a page within the hierarchical structure of a site, it allows navigation up to any of the ancestors.

Playground

Variations

Installation

import { Breadcrumb } from '@harnessio/ui/components'
//...
return (
<Breadcrumb.Root>
<Breadcrumb.List>
<Breadcrumb.Item>
<Breadcrumb.Link href="#">Lorem</Breadcrumb.Link>
</Breadcrumb.Item>
<Breadcrumb.Separator />
<Breadcrumb.Ellipsis />
<Breadcrumb.Separator />
<Breadcrumb.Item>
<Breadcrumb.Link href="#">Ipsum</Breadcrumb.Link>
</Breadcrumb.Item>
<Breadcrumb.Separator />
<Breadcrumb.Page>Dolor</Breadcrumb.Page>
</Breadcrumb.List>
</Breadcrumb.Root>
)

Components

Item

The Item component displays its contents as a node within the breadcrumb.

The Link component can be passed as a child to an Item component to display a clickable breadcrumb item.

Page

The Page component displays the current page (non-clickable, bold text).

Ellipsis

The Ellipsis component displays a truncation indicator. Click to show a dropdown with hidden items.

Copy

The Copy component displays a copy button to copy the breadcrumb path.

RootInteractive

The RootInteractive component displays an interactive root element with an avatar and dropdown chevron. Useful for header navigation.

Inline expand

Pass expandInline to Ellipsis to reveal the hidden items in place, as regular links, instead of opening a dropdown. Each item can carry an icon. For an Account > Organization > Project path, put account and organization in the items so only the project shows by default; each link goes to that level’s home.