Gift Finder by Budget
A budget-tab filter that narrows a gift grid to items in the selected price range, with a per-card wishlist toggle. Built for a holiday or gift-guide landing page where shoppers browse by "how much do I want to spend" rather than by category.
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/gift-finder-by-budget.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/ecommerce/ecommerce26.tsx instead.
Usage
The file also exports ecommerce26Demo, 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 { Ecommerce26, ecommerce26Demo } from "@/components/blocks/ecommerce/ecommerce26"; export default function Page() { return <Ecommerce26 {...ecommerce26Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Find a gift by budget" | Heading above the budget tabs. |
| description | string | "Filter by how much you want to spend and we'll narrow the list." | Supporting sentence under the heading. |
| budgets | BudgetOption[] | 4 preset ranges (Under $25 / $25-$50 / $50-$100 / $100+) | The tab list; the first entry is selected by default. |
| items | GiftItem[] | [] | Gift cards; only items whose priceRange matches the active tab are shown. |
| className | string | none | Extra classes for the outer section element. |
Types
type BudgetValue = "under-25" | "25-50" | "50-100" | "100-plus"; type BudgetOption = { value: BudgetValue; label: string }; type GiftItem = { id: string; name: string; price: string; priceRange: BudgetValue; // which budget tab this item shows under image?: { src: string; alt: string }; };
Behavior notes
- The budget tabs are real client state: clicking one filters the grid to items whose priceRange matches, it isn't a decorative tab strip.
- The wishlist heart on each card is genuine per-card local state (toggles a filled/outline heart and updates its aria-pressed value); it resets on reload since nothing is persisted.
- "Quick add" has no click handler, it's a static call-to-action placeholder rather than a working add-to-cart.
- If a budget tab has zero matching items, the grid collapses to a single "No gifts in this range yet" line instead of an empty grid.
- Switching tabs does not affect wishlist state; a hearted item stays hearted if you filter away and back to its budget range.
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.