Staaarter

Loyalty Rewards Program

Four-tier rewards program with points earning steps, benefit lists, and app store download buttons. Perfect for customer loyalty and membership programs.

By Staaarter Team
Food
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button, badge dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/loyalty-rewards-program.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/food/food1.tsx instead.

Usage

The file also exports food1Demo, 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 { Food1, food1Demo } from "@/components/blocks/food/food1";

export default function Page() {
  return <Food1 {...food1Demo} />;
}

Props

PropTypeDefaultDescription
badgestringnonePill above the heading; only rendered when set.
headingReactNodenoneSection heading.
descriptionstringnoneSection intro text below the heading.
stepsEarningStep[][]"How it works" earning steps, rendered as a numbered 3-column row.
tiersRewardTier[][]Reward tier cards, each with a fixed icon chosen by array position.
appStoreHrefstring"#"Link target for the App Store download button.
playStoreHrefstring"#"Link target for the Google Play download button.
classNamestringnoneExtra classes for the outer section element.

Types

type EarningStep = { title: string; description: string };

type RewardTier = {
  name: string;
  pointsRequired: string;
  benefits: string[];
};

Behavior notes

  • Both the steps row and the tiers grid render only when their array is non-empty, so either section can be omitted independently.
  • Tier icons cycle through a fixed 4-icon set indexed by array position rather than accepting an icon prop per tier, matching the closed set of dependencies this block ships with.
  • The App Store and Google Play buttons are plain links with no client-side download detection; they just point at appStoreHref/playStoreHref.
  • This is a plain server component: no client-side state, no event handlers anywhere in the tree.