Store Header navbar
React ecommerce header: an online store's header with live product search and a bag that counts up.
Features
- A slim top row for where you ship, one notice and small help links
- A search that shows popular products when empty and matches as you type, with prices
- Add to bag straight from the search results
- The bag's count rolls up and the bag dips once when something is added
- Departments collapse into a menu on phones
Best for: Online stores, from a single shop to a catalogue with several departments.
Installation
npm install motion lucide-react 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. |
| items | NavItem[] | - | The store's departments. |
| region | string | - | Where you ship, shown as "Ship to …" on the top row. |
| notice | string | - | One line in the middle of the top row. |
| utilityLinks | { label: string; href: string }[] | - | Small links on the top row. |
| products | StoreProduct[] | - | What the search looks through: name, price, href, image. |
| bagCount | number | - | Items in the bag; the number rolls when it rises. |
| bagHref | string | - | Where the bag links to. |
| accountHref | string | - | Where the account icon links to. |
| onAdd | (product) => void | - | Shows Add on each result; called when pressed. |
| className | string | - | Extra classes for the header. |
FAQ
Is the Store Header navbar free to use?
Yes. Store Header is free to copy into your own projects. Open the Code tab and paste the files into your app.
Does Store Header 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 Store Header in JavaScript instead of TypeScript?
Yes. Every file comes in TypeScript and JavaScript. Switch the language in the Code tab.
What does Store Header need installed?
motion, lucide-react, clsx, tailwind-merge, plus the shared helpers from the Installation page.
Is Store Header 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.