ComponentsData display

Referral panel

The "you're on the list" panel of a waitlist or referral programme: the person's place in line, a personal link to copy or send through the device's share sheet, and how many friends joined with it — with a progress bar toward a reward. The queue number is one polite sentence for screen readers; the copy result is announced.

components/referral-panel.tsxtheme · material · accent · density · font

Your place in line

You are number 362 of 2,380 in line.

Invite friends

Every friend who joins with your link moves you up 50 places.

Invites toward early access

2 more friends to unlock early access

Installation

$ pnpm add @vamos-ui/react

The whole kit as one package — get updates by bumping the version. Add the styles to globals.css: @import "@vamos-ui/react/styles.css";

Usage

import { ReferralPanel } from "@vamos-ui/react";

<ReferralPanel
  position={signup.position}
  total={signup.total}
  shareUrl={`https://example.com/r/${signup.code}`}
  referrals={signup.referrals}
  goal={3}
  reward="early access"
  description="Every friend who joins with your link moves you up the line."
/>

Never show invented queue numbers or counts; the recipe for a launch waitlist calls this out.

Copy falls back to a hidden textarea where the Clipboard API is missing, and says so when both fail.

Examples

Referral without a queue

Leave out position for a plain invite programme; without goal it shows the referral count.

Give a month, get a month

When a friend subscribes with your link, you both get a month free.

2 friends joined with your link

Reward unlocked, custom labels

Once referrals reach goal the bar turns success and data-state="unlocked" is set.

Your spot

You are number 38 in line.

Bring your team

Invites toward the founding badge

the founding badge unlocked

API

ReferralPanel

PropTypeDefault
shareUrl
The person's link: shown read-only, copied and shared as is.
string—
shareText / shareTitle
Text and title for the native share sheet (navigator.share). The Share button only appears where the device has one.
string—
position
Place in the queue. Leave out when there is none.
number—
total
People in the queue ("of 2,380"). Only real numbers.
number—
referrals
Friends who joined with the link.
number0
goal
Referrals needed for the reward; shows a progress bar.
number—
reward
What the goal unlocks, as a phrase ("early access").
string—
title
Heading; null hides it.
ReactNode | null"Invite friends"
description
How the rules work, under the heading.
ReactNode—
headingLevel
Heading level.
2 | 3 | 42
onCopy / onShare
After a copy / a completed share (analytics).
(url: string) => void—
labels
Dictionary namespace "referralPanel" (en, tr, de, fr, es, ar built in).
Partial<ReferralPanelLabels>—