Path Bar navbar
Breadcrumb navbar: the navbar as the page's path; every step opens the pages beside it.
Features
- The bar reads as the page's path: logo / docs / deploying / custom domains
- Every step opens a short list of the pages beside it, the current one ticked
- The last step follows the section you're reading and rolls to its name
- On phones the bar keeps the logo and the page you're on
- Plain links and buttons, all reachable from the keyboard
Best for: Documentation, help centres and large catalogues where people move sideways as often as down.
Installation
npm install motion lucide-react @radix-ui/react-slot class-variance-authority clsx tailwind-mergeThen copy the files from the Code tab into the same paths in your project, in TypeScript or JavaScript.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| logo | ReactNode | - | Your logo. It inherits currentColor. |
| path | PathSegment[] | - | The levels above this page, top first: label, href and optional siblings. |
| items | NavItem[] | - | This page's sections; the last step follows them. |
| login | { label: string; href: string } | - | Optional quiet log in link. |
| cta | { label: string; href: string } | - | Optional small button. |
| className | string | - | Extra classes for the header. |
FAQ
Is the Path Bar navbar free to use?
Yes. Path Bar is free to copy into your own projects. Open the Code tab and paste the files into your app.
Does Path Bar work with Next.js and React?
Yes. It's a React client component made for the Next.js App Router, styled with Tailwind CSS and animated with Framer Motion (the motion package).
Can I use Path Bar in JavaScript instead of TypeScript?
Yes. Every file comes in TypeScript and JavaScript. Switch the language in the Code tab.
What does Path Bar need installed?
motion, lucide-react, @radix-ui/react-slot, class-variance-authority, clsx, tailwind-merge, plus the shared helpers from the Installation page.
Is Path Bar accessible?
Every link and button is reachable by keyboard with a visible focus ring, and the animation stays still for visitors who ask for reduced motion.