Wishlist Manager
A saved-items list for a wishlist or favorites page. Each row shows a product image, name, brand, price, and a stock-status badge, with a move-to-cart button and a remove button that genuinely take the item out of the list. Includes a friendly empty state once every item has been removed.
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/wishlist-manager.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/ecommerce/ecommerce1.tsx instead.
Usage
The file also exports ecommerce1Demo, 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 { Ecommerce1, ecommerce1Demo } from "@/components/blocks/ecommerce/ecommerce1"; export default function Page() { return <Ecommerce1 {...ecommerce1Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Your wishlist" | Section heading. |
| description | string | "Items you've saved for later..." | Supporting copy under the heading. |
| items | WishlistItem[] | none | Initial saved items, used to seed local state on mount. |
| browseHref | string | "#" | Destination for the empty state's "Browse products" button. |
| className | string | none | Extra classes for the outer section element. |
Types
interface WishlistItem { id: string; name: string; brand?: string; price: string; originalPrice?: string; image?: { src: string; alt: string }; stock: "in-stock" | "low-stock" | "out-of-stock"; }
Behavior notes
- "Move to cart" and "Remove" both remove the item from local component state (a real useState array); there's no cart or backend behind this block, so "move to cart" is honestly just a removal from the wishlist view.
- "Move to cart" is disabled once an item's stock is "out-of-stock", the remove (X) button stays enabled regardless of stock.
- The empty state shown after removing every item is real, reachable UI, not a separate mockup, remove all 8 demo items in the live preview to see it.
- Refreshing the page resets the list back to the seeded `items` prop since nothing persists.
- Items with no `image` fall back to `MediaSlot`'s built-in placeholder rather than a broken image.
More Ecommerce Blocks
View all →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.
shipping-info-cards
Shipping Info Cards
A row of icon cards covering shipping, delivery, returns, and support promises.