Featured Products Grid
A hover-revealed featured products grid: a Quick add overlay appears on hover and each card's wishlist heart is a real, per-card toggle. Built for a homepage or category landing spot showcasing a curated set of products.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/featured-products-grid.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/ecommerce/ecommerce29.tsx instead.
Usage
The file also exports ecommerce29Demo, 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 { Ecommerce29, ecommerce29Demo } from "@/components/blocks/ecommerce/ecommerce29"; export default function Page() { return <Ecommerce29 {...ecommerce29Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Featured products" | Heading above the product grid. |
| description | string | "This week's picks from across the store." | Supporting sentence under the heading. |
| products | FeaturedProduct[] | [] | Product cards to render in the grid. |
| className | string | none | Extra classes for the outer section element. |
Types
type FeaturedProduct = { id: string; name: string; price: string; rating: number; // 0-5, rounded to the nearest whole star for the filled-star count image?: { src: string; alt: string }; };
Behavior notes
- The wishlist heart is genuinely interactive: it is real per-card local state toggled on click, with a matching aria-pressed value and label, unlike the Quick add overlay below it.
- "Quick add to cart" is a pure CSS hover reveal (opacity/translate on group-hover) with no click handler, it's a static call-to-action placeholder, not a working add-to-cart.
- The hover overlay only appears on pointer hover; on touch devices it stays hidden since there is no hover state, so the wishlist heart (always visible) is the only interactive affordance on touch.
- A product without an image falls back to a centered ShoppingBag icon on a muted background instead of a broken image.
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.