Breadcrumb Component
A breadcrumb navigation component that helps users understand their location in a website hierarchy.
- Responsive and accessible design
- Customizable separators and styling
- Works with various navigation libraries
- Includes support for icons and home navigation
Installation
The Breadcrumb component is part of our UI library. You can import it directly from the components directory.
Usage
Here is how to use the breadcrumb in your project.
React TSX
React TSX
Examples
Basic Breadcrumb
Breadcrumb with Home Icon
Breadcrumb with Ellipsis for Long Paths
API Reference
Breadcrumb Component Parts
The Breadcrumb component is composed of several parts:
Component | Description |
---|---|
Breadcrumb | The root container for the breadcrumb navigation |
BreadcrumbList | The list container for breadcrumb items |
BreadcrumbItem | Individual item in the breadcrumb navigation |
BreadcrumbLink | Link element for clickable breadcrumb items |
BreadcrumbPage | Current page element (not clickable) |
BreadcrumbSeparator | Visual separator between breadcrumb items |
BreadcrumbEllipsis | Ellipsis element for indicating truncated items |
Styling
The Breadcrumb component comes with sensible default styling:
- The current page is displayed in bold and uses a different color to indicate it's not a link
- Links have hover effects to indicate interactivity
- Separators are styled with a muted color to visually separate items
- Icon support for the home item enhances visual recognition
Accessibility
The Breadcrumb component follows accessibility best practices:
- Uses semantic HTML elements
- Includes appropriate ARIA attributes for screen readers
- Clearly distinguishes between links and the current page
- Provides visual cues for hover and focus states