Overview
The Breadcrumb component provides a way to display the current page’s location within a navigational hierarchy. It consists of multiple sub-components that work together to create accessible breadcrumb navigation.Components
Breadcrumb
The root container component for breadcrumb navigation.Custom separator element to display between breadcrumb items.
Ref forwarded to the underlying nav element.
React.ComponentPropsWithoutRef<'nav'>.
BreadcrumbList
An ordered list container for breadcrumb items.Additional CSS classes to apply to the list.
Ref forwarded to the underlying ol element.
React.ComponentPropsWithoutRef<'ol'>.
BreadcrumbItem
A list item wrapper for individual breadcrumb entries.Additional CSS classes to apply to the item.
Ref forwarded to the underlying li element.
React.ComponentPropsWithoutRef<'li'>.
BreadcrumbLink
A link component that automatically handles internal and external links.When true, uses Radix UI’s Slot component to merge props with the child element.
The URL the link points to. Internal links (starting with ’/’) use Next.js Link component.
Additional CSS classes to apply to the link.
Ref forwarded to the underlying anchor element.
React.ComponentPropsWithoutRef<'a'>.
BreadcrumbPage
Represents the current page in the breadcrumb trail.Additional CSS classes to apply to the current page indicator.
Ref forwarded to the underlying span element.
React.ComponentPropsWithoutRef<'span'>.
BreadcrumbSeparator
A visual separator between breadcrumb items.Custom separator content. Defaults to ChevronRight icon.
Additional CSS classes to apply to the separator.
React.ComponentProps<'li'>.
BreadcrumbEllipsis
Displays an ellipsis icon to indicate collapsed breadcrumb items.Additional CSS classes to apply to the ellipsis.
React.ComponentProps<'span'>.
Usage
Accessibility
The Breadcrumb component includes several accessibility features:- The root
navelement hasaria-label="breadcrumb"for screen readers - The current page uses
role="link",aria-disabled="true", andaria-current="page" - Separators use
role="presentation"andaria-hidden="true"to hide them from screen readers - The ellipsis includes a visually hidden “More” label for screen readers
Source
Implementation:/home/daytona/workspace/source/packages/ui/src/breadcrumb/breadcrumb.tsx