Back to blocks
BlockeCommerceFree

Low Stock Urgency Badge React component

Honest stock urgency for product pages and cards: badges that switch between In stock, Selling fast, Only n left (pulsing amber), Last one! (red with a shake) and Back on a date, plus a segmented stock meter that highlights the units you're about to take and drops when you add to cart.

About the Low Stock Urgency Badge component

Low Stock Urgency Badge shows shoppers when an item is running out, using your real inventory and sales numbers. Badges move from In stock to Only a few left, Last one and Back soon, and popular items can show how many sold today.

On the product page, a segmented meter makes the remaining stock easy to read at a glance and highlights the units the shopper is about to take. Adding to cart lowers the count, so the page always reflects what is left.

When to use it

Use it when stock is genuinely limited, such as small batches, sale items or the last sizes of a season, to help people decide before an item is gone.

Don't invent scarcity. Showing 'Only 3 left' on items you have plenty of, or fake viewer counts, erodes trust and can break consumer protection rules in some regions.

Installation

Add the Low Stock Urgency Badge component to your project with the shadcn CLI. It lands in components/low-stock-urgency-badge.tsx as plain React + Tailwind CSS source you own and can edit.

Install
Copied!
npx shadcn@latest add @reactframe/low-stock-urgency-badge

Or copy the source by hand and install its dependencies:

Install
Copied!
npm install motion clsx tailwind-merge

Related components

Shipping Estimator
Free
Back-in-Stock Notify
Free
Product Comparison Table
Free
Wishlist Drawer
Free
Recently Viewed Products
Free
SEO-ready
Meet the Team
$4