Breadcrumbs
Compound breadcrumb navigation with auto-separator and composable parts for links, collapsed items, and custom separators.
Installation
dgadd ships in @diffgazer/add on npm: pnpm add -D @diffgazer/add puts it on pnpm exec, and npx @diffgazer/add runs it without the install.
UI components require Tailwind CSS v4. Local copy mode imports src/styles/styles.css; package mode uses @diffgazer/ui CSS from the installed package.
Usage
Examples
Custom Separator
Custom Link
Ellipsis
Constrained Width
API Reference
Breadcrumbs
Breadcrumbs.Item
Breadcrumbs.Link
Breadcrumbs.Ellipsis
Accessibility
Notes
Current Page
Use the current prop on any Breadcrumbs.Item to mark it as the current page (sets aria-current='page' and bold styling).
Auto-Separator
Separators are inserted automatically between items. Pass separator={<ChevronRight />} to customize, or separator={null} to disable.
Router Integration
Use the render-prop on Breadcrumbs.Link to integrate framework link components (Next.js Link, React Router NavLink). Pass a function as children to receive computed props (ref, className, etc.) and render your custom element.
Source
Install via CLI: pnpm exec dgadd add ui/breadcrumbs.
Highlighted source loads after this disclosure opens. Browse the source repository.