Skip to main content

Breadcrumb

Examples

Check out the Usage section for details about how to design a breadcrumb properly, and the different configuration options we provide.

Basic example

Add a secondary navigation component to show a user their current location in respect to parent levels.

<Breadcrumb
links={[
{
href: 'grandparent-url',
text: 'Grandparent Page'
},
{
href: 'parent-url',
text: 'Parent page'
},
{
text: 'Current Page'
}
]}
/>

Last item clickable example

By default the last item is not a clickable link, however you can change this using the lastItemClickable property.

<Breadcrumb
lastItemClickable={true}
links={[
{
href: 'grandparent-url',
text: 'Grandparent Page'
},
{
href: 'parent-url',
text: 'Parent page'
},
{
href: 'current-url',
text: 'Current Page'
}
]}
/>

If there is only one parent, the component will render as a link with the text "Back" and a left-facing arrow.

<Breadcrumb
links={[
{
href: 'parent-url',
text: 'Parent page'
},
{
text: 'Current Page'
}
]}
/>

If there is only one parent and the backLinkWithoutText property is true, the component will render as just a left-facing arrow.

<Breadcrumb
backLinkWithoutText={true}
links={[
{
href: 'parent-url',
text: 'Parent page'
},
{
text: 'Current Page'
}
]}
/>