Product page navbarProduct Bar navbar

Product page navbar: a product's own bar that takes over from the site's navbar as you scroll.

Features

  • Two rows: the site's navbar, and a row for this product with its sections and Buy
  • Past the opening screen the site's row slides away and the product row takes the top
  • The price joins the Buy button once the product row is on top
  • The section you're reading turns ink
  • Only transform, opacity and a clip move

Best for: Hardware, apps and any single-product page that wants Buy in reach the whole way down.

Installation

npm install motion @radix-ui/react-slot class-variance-authority clsx tailwind-merge

Then copy the files from the Code tab into the same paths in your project, in TypeScript or JavaScript.

Props

PropTypeDefaultDescription
logoReactNode-Your logo. It inherits currentColor.
itemsNavItem[]-The site's own links, in the top row.
product{ name: string; price: string }-The product this page sells.
sectionsNavItem[]-This page's sections, in the product row.
buy{ label: string; href: string }-The Buy button.
classNamestring-Extra classes for the header.

FAQ

Is the Product Bar navbar free to use?

Yes. Product Bar is free to copy into your own projects. Open the Code tab and paste the files into your app.

Does Product 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 Product Bar in JavaScript instead of TypeScript?

Yes. Every file comes in TypeScript and JavaScript. Switch the language in the Code tab.

What does Product Bar need installed?

motion, @radix-ui/react-slot, class-variance-authority, clsx, tailwind-merge, plus the shared helpers from the Installation page.

Is Product 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.