Back to blocks
BlockeCommerceFree

Icon Category Nav React component

A store category bar of line icons with labels that keeps as many categories as fit and folds the rest into a More menu as the width changes, with a little hover animation per icon, a sliding underline on the current category and a subcategory strip below.

About the Icon Category Nav component

Icon Category Nav is the row of small icons with labels that sits under a store's header: Audio, Watches, Desk, Sale and so on. It always fits the screen: when there isn't room for every category, the ones at the end move into a More menu with a count, and they come back as the window gets wider.

Each icon has its own small hover move, a line slides under the category you're in, and the strip underneath shows where you are, how many products there are and the subcategories to narrow things down.

When to use it

Use it as the category bar on a store home page or the top of collection pages, especially for shops with eight or more categories.

Order categories by how much people use them; the first ones are the ones that stay visible on small screens. Mark sales or seasonal categories with highlight so they stand out in green.

Installation

Add the Icon Category Nav component to your project with the shadcn CLI. It lands in components/icon-category-nav.tsx as plain React + Tailwind CSS source you own and can edit.

Install
Copied!
npx shadcn@latest add @reactframe/icon-category-nav

Or copy the source by hand and install its dependencies:

Install
Copied!
npm install motion clsx tailwind-merge

Related components

Tabbed Product List
Free
Featured Categories Banner
Free
Masonry Product Grid
Free
Category Carousel
Free
Newsletter Discount Modal
Free
SEO-ready
Meet the Team
$4