Back in Stock Notification
A back-in-stock notice for an unavailable product: a photo, name, and "Currently unavailable" badge, an email and optional SMS signup form, and a waitlist counter. Submitting the form genuinely swaps it for a confirmation message, no email is actually sent.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button, badge, media-slot dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/back-in-stock-notification.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/ecommerce/ecommerce22.tsx instead.
Usage
The file also exports ecommerce22Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Ecommerce22, ecommerce22Demo } from "@/components/blocks/ecommerce/ecommerce22"; export default function Page() { return <Ecommerce22 {...ecommerce22Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| productName | string | none | Product name shown next to the thumbnail. |
| productImage | MediaSlotImage | undefined | Product thumbnail; falls back to a centered Package icon when omitted. |
| waitlistCount | number | none | Number shown in the "N people are waiting" caption. |
| className | string | none | Extra classes for the outer section element. |
Types
type MediaSlotImage = { src: string; alt: string };
Behavior notes
- Submitting the form is genuinely validated client-side: it requires the email field to contain both "@" and "." before accepting it, showing an inline error otherwise. On a valid submit, real useState swaps the form out for a confirmation message quoting the typed email back ("We'll email you at {email}..."). No email is actually sent and no signup is stored anywhere; this is local UI state only.
- The optional SMS phone input has no validation of its own and isn't referenced in the confirmation message, it's collected but not otherwise used in this demo.
- waitlistCount is a static prop, it doesn't increment when the demo form is submitted.
More Ecommerce Blocks
View all →wishlist-manager
Wishlist Manager
Saved-items list with stock-status badges, move-to-cart and remove actions, and a real empty state.
product-information-tabs
Product Information Tabs
Tabbed product details with Description, Features, Specifications, Reviews, and Shipping panels.
collection-showcase-grid
Collection Showcase Grid
A large featured-collection hero card alongside a grid of smaller supporting collection tiles.
shop-by-brand-grid
Shop by Brand Grid
A grid of bordered brand tiles with a wordmark-style name, product count, and a hover affordance.
sale-countdown-timer
Sale Countdown Timer
A live days/hours/minutes/seconds countdown in default, compact, or full-width banner layouts.
gift-card-redemption-form
Gift Card Redemption Form
A code-entry form that validates against a fixed list of demo gift cards and shows a real success or error state.