Loyalty Rewards
Loyalty program: points, tier, progress and a rewards catalog. Pro · Shop and payments › Payments and wallet
Installation
npx valyro-cli@latest login
npx valyro-cli@latest add loyalty-rewards
npm install valyro-ui-pro
import 'valyro-ui-pro/styles.css';
import { LoyaltyRewards } from 'valyro-ui-pro';
Props
| Prop | Type | Default | |
|---|---|---|---|
points * | number | Points the member can spend now. | |
lifetimePoints | number | Points earned all time (they decide the tier). | |
tier * | LoyaltyTier | The member's current tier. | |
nextTier | LoyaltyNextTier | The tier above, for the progress bar. | |
rewards * | LoyaltyReward[] | What points buy. | |
claimed | string[] | Ids of claimed rewards (controlled). | |
defaultClaimed | string[] | Initial claimed when uncontrolled. | |
onClaimedChange | (claimed: string[]) => void | Called with the new claimed when it changes. | |
onClaim | (reward: LoyaltyReward) => void | Called when a reward is claimed: deduct the points there. Until points changes, the balance shown already excludes it. | |
howToEarn | ReactNode | Content of the "How to earn" tab. | |
tab | string | Open tab (controlled): rewards, claimed or earn. | |
defaultTab | string | Initial tab when uncontrolled. | |
onTabChange | (tab: string) => void | Called with the new tab when it changes. | |
locale | string | BCP 47 locale for the numbers. | |
labels | Partial<LoyaltyRewardsLabels> | Overrides for the built-in English text; keys left out keep their defaults. |
Related components
- Credit Card — Bank card: gradient or two-tone, network detected from the number, contactless
- Card Input — Number, expiry and CVC in one field: masks, Luhn check, auto-advance
- Payment Methods — Saved cards and wallets as selectable cards
- Transaction List — Transactions: charges, top-ups, refunds and balance
- Wallet Balance — Wallet balance: hide amount, actions, card for top-ups
- Purchase Card — Product purchase: banner, one-time payment or subscription, card and address
- Product Card — Product card
- Product Grid — Product catalog
- Product Filters — Catalog filters
- Product Spotlight — Featured product: tagged photo, price, rating and actions
- Reviews Summary — Reviews: average rating, filterable histogram, sorting and helpful votes
- Guided Product Finder — Product finder wizard: branching questions and why a product fits
Previous: Purchase Card · Next: Subscription Manager · All Shop and payments