Staaarter

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.

By Staaarter Team
Ecommerce
Docs
Live preview

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.json

Prefer 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

PropTypeDefaultDescription
headingstring"Find a gift by budget"Heading above the budget tabs.
descriptionstring"Filter by how much you want to spend and we'll narrow the list."Supporting sentence under the heading.
budgetsBudgetOption[]4 preset ranges (Under $25 / $25-$50 / $50-$100 / $100+)The tab list; the first entry is selected by default.
itemsGiftItem[][]Gift cards; only items whose priceRange matches the active tab are shown.
classNamestringnoneExtra 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.