Staaarter

Referral Rewards Tiers

A centered pre-launch referral card: a progress bar shows how many friends the visitor has referred, a list of reward tiers shows which rewards are already unlocked and which are still locked, and a dark Share button copies the visitor's referral link to the clipboard.

By Staaarter Team
Coming Soon
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/referral-rewards-tiers.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/coming-soon/comingsoon71.tsx instead.

Usage

The file also exports comingsoon71Demo, 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 { ComingSoon71, comingsoon71Demo } from "@/components/blocks/coming-soon/comingsoon71";

export default function Page() {
  return <ComingSoon71 {...comingsoon71Demo} />;
}

Props

PropTypeDefaultDescription
eyebrowstring"Coming soon"Small label above the heading.
headingstring"Invite friends, unlock rewards"Section heading.
descriptionstring"Share your referral link, every friend who joins..."Section subheading.
referralCountnumber3Number of referrals to show next to the progress bar.
progressPercentnumber60Progress bar fill percentage, clamped to 0-100.
progressLabelstring"3 of 5 referrals to the next reward"Label above the progress bar.
tiersRewardTier[]noneReward tiers to render, each flagged locked or unlocked.
referralUrlstring"https://example.com/invite/a1b2c3"Referral link copied to the clipboard by the Share button.
classNamestringnoneExtra classes for the outer section element.

Types

export interface RewardTier {
  id: string;
  label: string;
  threshold: number;
  reward: string;
  unlocked: boolean;
}

Behavior notes

  • Real interactivity: the Share button calls navigator.clipboard.writeText(referralUrl) and swaps its label/icon to "Copied" (useState), it does not revert back automatically.
  • The progress bar percentage, referral count, and each tier's locked/unlocked flag are all static props, nothing computes or animates them.
  • Locked tiers get a Lock icon and reduced opacity, unlocked tiers get a Check icon, purely conditional styling from the `unlocked` boolean.