Back to blocks
BlockeCommerceFree

Mobile Filter Modal React component

A phone-first filter sheet: a floating Filter & sort button with an active-count badge opens a bottom sheet you can drag down to close, with sort radios and collapsible category, price, colour, rating and in-stock sections that summarise their choice, plus a sticky footer with Clear and a live Show N results button.

About the Mobile Filter Modal component

Mobile Filter Modal is the filter pattern shoppers expect on a phone: a floating Filter & sort button that opens a bottom sheet with everything in one place. Sections fold away and show what's chosen in a short line, so the sheet stays short even with many filters.

Changes are a draft until the shopper taps Show N results, and the button keeps counting matches as they go, so they never apply a filter that leaves nothing. The sheet can be dragged down to dismiss, like the native sheets people already know.

When to use it

Use it for product listings on phones, typically below your md breakpoint, alongside a sidebar or a horizontal filter bar on larger screens.

Keep the sections to what people actually filter by; five or six is plenty for a sheet.

Installation

Add the Mobile Filter Modal component to your project with the shadcn CLI. It lands in components/mobile-filter-modal.tsx as plain React + Tailwind CSS source you own and can edit.

Install
Copied!
npx shadcn@latest add @reactframe/mobile-filter-modal

Or copy the source by hand and install its dependencies:

Install
Copied!
npm install motion clsx tailwind-merge

More eCommerce components

Gift Card Designer
Free
Horizontal Filter Bar
Free
Rating Summary Breakdown
Free
Order Confirmation Block
Free
Photo Review Gallery
Free
Accordion Checkout
Free