Charcoal UI

Breadcrumb

Long trails fold their middle into “…”. Click it and the hidden crumbs unblur into place one after another.

  • Category: Navigation
  • Licence: Free, MIT
  • Built with: React 19, Tailwind CSS 4, Motion
  • Dependencies: motion, clsx, tailwind-merge

Examples

Breadcrumb

API reference

PropTypeDefaultDescription
items{ label: string; href?: string }[]—
maxItemsnumber4
onNavigate(item, event) => void—

About Breadcrumb

Breadcrumb shows where a page sits in the hierarchy and handles long trails gracefully: the middle folds into an ellipsis, and clicking it unblurs the hidden crumbs into place one after another.

Breadcrumb is a navigation component for React 19, styled with Tailwind CSS 4 and animated with Motion. It drops into Next.js, Vite, Remix or Astro through the shadcn CLI as a single file you own.

When to use Breadcrumb

  • File and folder paths.
  • Docs and knowledge-base pages.
  • Deep category trees in shops.
  • Admin consoles with nested resources.

How it works

maxItems decides how many crumbs stay visible; the rest collapse behind a button that expands them with a staggered reveal. It renders a nav with an ordered list and marks the last crumb with aria-current.

Links and buttons keep their roles, arrow keys move where a group is expected, the current item is marked with aria-current, and focus is always visible. With prefers-reduced-motion on, it holds still or settles instantly instead of animating.

Customizing Breadcrumb

Every prop is documented in the API reference above with its type and default. The ones you will reach for first are listed here.

The Customize panel next to the preview lets you change maxItems live, and the Code tab updates to match, so the snippet you copy already carries your values.

  • items.
  • maxItems (number, default 4).

Goes well with Breadcrumb

These navigation pieces share its tokens and motion language, so they sit together on one page without clashing.

  • Tabs: Animated React tabs with a gliding indicator and panels that slide the way you travel
  • Pagination: Animated React pagination with smart gaps and a pill that glides to the current page
  • Sidebar: A collapsible React app sidebar with spring width, fading labels and an active marker
  • Steps: Animated React steps for multi-step flows: filling connectors and drawn checks
  • Dropdown Menu: An animated React dropdown menu with icons, shortcuts, checkboxes and keyboard control

Install Breadcrumb

npx shadcn@latest add https://charcoalui.com/r/breadcrumb.json

Breadcrumb is free and MIT licensed. The command copies breadcrumb.tsx into components/ui and installs clsx, tailwind-merge; you can also copy the source from the Code tab by hand.

It pairs well with Morph Menu, a Pro piece: A button that stretches into its own menu surface, then shrinks back. Arrow keys and Escape work.

Frequently asked questions

How do I install Breadcrumb?
Run npx shadcn@latest add https://charcoalui.com/r/breadcrumb.json. The shadcn CLI copies breadcrumb.tsx into components/ui and installs motion, clsx, tailwind-merge. You can also copy the source from this page by hand.
Is Breadcrumb free for commercial use?
Yes. Breadcrumb is MIT licensed: use it in any personal or commercial project and change it however you like.
Does Breadcrumb work with Next.js?
Yes. It is a client component for React 19 styled with Tailwind CSS 4, so it works in the Next.js App Router and Pages Router, Vite, Remix and Astro.
Can an AI coding agent install Breadcrumb?
Yes. Connect the Charcoal UI MCP server (https://charcoalui.com/mcp) to Claude Code, Cursor or any MCP client; get_component returns Breadcrumb's props and source and get_install_command returns the exact command.

Breadcrumb as Markdown · llms.txt