ComponentsBreadcrumbs
Breadcrumb
A navigational component for displaying a user's location within a site hierarchy.
done
Overview
The Breadcrumb component provides hierarchical navigation, allowing users to trace their path through a website or application. It is especially useful for multi-level navigation systems and improves both usability and accessibility.
Examples
Basic Usage
With Dropdown
With Current Path Detection
For Next.js applications, you can pass the current pathname to automatically highlight the active dropdown option. The dropdown item will be highlighted with a purple radio button:
Behavior
The Breadcrumb component automatically handles several behaviors:
- Last item styling: The last item in the breadcrumb is automatically styled differently (non-clickable for links, special styling for dropdowns)
- Dropdown state management: Dropdown open/close states are managed internally
- Radio selection: When
currentPathis provided, matching dropdown options are automatically selected with a radio button - Chevron rotation: Dropdown chevrons rotate when opened/closed
- Fallback values: If no
valueis provided for dropdown options, thelabelis used as the value
CSS Classes
The component applies the following CSS classes that can be styled:
integral-breadcrumb: Main breadcrumb containerintegral-breadcrumb__list: Breadcrumb list containerintegral-breadcrumb__item: Individual breadcrumb itemsintegral-breadcrumb__item--dropdown: Dropdown button itemsintegral-breadcrumb__item--link: Link itemsintegral-breadcrumb__item--page: Page (non-clickable) itemsintegral-breadcrumb__item--last: Last item in breadcrumbintegral-breadcrumb__dropdown-chevron: Chevron icon in dropdownsintegral-breadcrumb__dropdown-chevron--open: Chevron when dropdown is openintegral-breadcrumb__dropdown-chevron--last: Chevron in last dropdown itemintegral-breadcrumb__menu-content: Dropdown menu contentintegral-breadcrumb__menu-item: Individual dropdown menu itemsintegral-breadcrumb__separator-chevron: Separator between breadcrumb items
Props
Breadcrumb Props
Prop
Type
BreadcrumbItem Props
Prop
Type
DropdownOption Props
Prop
Type
Import
import { Breadcrumb } from '@im/integral/components/styled';