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.jsonPrefer 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
| Prop | Type | Default | Description |
|---|---|---|---|
| badge | string | none | Pill above the heading; only rendered when set. |
| heading | ReactNode | none | Section heading. |
| description | string | none | Section intro text below the heading. |
| steps | EarningStep[] | [] | "How it works" earning steps, rendered as a numbered 3-column row. |
| tiers | RewardTier[] | [] | Reward tier cards, each with a fixed icon chosen by array position. |
| appStoreHref | string | "#" | Link target for the App Store download button. |
| playStoreHref | string | "#" | Link target for the Google Play download button. |
| className | string | none | Extra 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.
More Food Blocks
View all →Gift Card Shop
Gift card purchase interface with preset amounts, custom input, digital/physical delivery options, and live preview.
Online Ordering Hub
Delivery platform cards with logos, fees, and delivery times alongside pickup info with address and phone.
Expandable Menu Accordion
Collapsible menu items revealing full images, calorie counts, protein info, and allergen badges.
Daily Specials Chalkboard
Dark-themed chalkboard-style menu with decorative corners, day labels, and timestamp.
Dietary Filter Menu
Interactive menu with dietary filter buttons (vegetarian, vegan, gluten-free) and allergen warnings.
Set Menu Pricing Cards
Three-tier pricing cards for group dining with included items, minimum guests, and booking buttons.