GitHub
Core
Glass
Brutal
Humanist

Breadcrumbs

Breadcrumbs provide navigation context showing the path to the current page. They support separator styles, custom icons, and click handlers.

Breadcrumbs Playground
Preview
Code
Controls
Separator:
Slash
Arrow
Show Icons:

Installation

You can add the breadcrumbs component to your project manually:

1

Install the following dependencies:

npm install @phosphor-icons/react @react-aria/focus
2

Copy and paste the following code into your project.

Loading source code...
3

Update the import paths to match your project setup.

Update the import aliases (e.g. @/components, @/utils) in the copied files to match your project's path configuration.

Basic Usage

A simple breadcrumb trail with links:

import { Breadcrumbs } from '@versaui/ui/components/Breadcrumbs';

<Breadcrumbs
  items={[
    { label: 'Home', href: '/' },
    { label: 'Products', href: '/products' },
    { label: 'Details' },
  ]}
/>

Separator Styles

Two separator styles are available — slash (default) and arrow:

// Slash separator (default)
<Breadcrumbs
  separator="slash"
  items={[
    { label: 'Home', href: '/' },
    { label: 'Settings' },
  ]}
/>

// Arrow separator
<Breadcrumbs
  separator="arrow"
  items={[
    { label: 'Home', href: '/' },
    { label: 'Settings' },
  ]}
/>

With Icons

Add icons to individual breadcrumb items using the icon and iconComponent props:

import { HouseIcon } from '@phosphor-icons/react';

<Breadcrumbs
  items={[
    { label: 'Home', href: '/', icon: true, iconComponent: <HouseIcon /> },
    { label: 'Products', href: '/products' },
    { label: 'Details' },
  ]}
/>

Click Handlers

Use onClick instead of href for programmatic navigation:

<Breadcrumbs
  items={[
    { label: 'Home', onClick: () => router.push('/') },
    { label: 'Current Page' },
  ]}
/>

Accessibility

  • Uses <nav aria-label="Breadcrumb"> for semantic navigation
  • Current page marked with aria-current="page"
  • Separator characters are hidden from screen readers via aria-hidden
PropTypeDefaultDescription
separator'slash' | 'arrow''slash'Visual separator between items.
itemsBreadcrumbItem[]Array of breadcrumb items.
classNamestring''Additional CSS classes.
PropTypeDefaultDescription
labelstringRequired. Display text for the breadcrumb.
hrefstringLink URL. Omit for the current (last) item.
iconbooleanfalseWhether to show an icon.
iconComponentReactNodeCustom icon element to render.
onClick() => voidClick handler for programmatic navigation.

On this page