# Loyalty Card — React Native component for Expo

> A points or stamp card on a shop photo that tilts and flips to a member code.

A membership or loyalty card on a photo of your shop — points and tier with progress to the next reward, or a stamp card with white stamps. It tilts toward your finger and flips on tap to a member code for the till.

- Docs: https://expokit.in/docs/components/loyalty-card
- Tier: Pro (ExpoKit Pro plan)
- Also called: stamp card, loyalty program card, rewards card
- Category: 3D
- Platforms: iOS, Android, web
- Expo Go: yes, no development build needed
- npm dependencies: react-native-svg
- Uses ExpoKit items: kit, tilt-card, flip-card, ticket-shape
- Variants: Rewards Screen, Stamp Card, Club Pass

## Installation

This component is part of ExpoKit Pro. With a Pro plan, log the CLI in once and add it like any other item:

```bash
npx @expokit/cli@latest login
```

Plans: https://expokit.in/pricing

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `brand` | `string` | — | Programme name, top-left. |
| `member` | `string` | — | Member's name (bottom line). |
| `memberId` | `string` | — | Shown on the back under the code. |
| `tier` | `string` | — | Tier pill, e.g. "Gold". |
| `points` | `number` | — | Points balance (ignored with stamps). |
| `nextReward` | `{ at: number; label: string }` | — | Draws progress toward the next reward. |
| `stamps` | `{ filled: number; total: number; reward?: string }` | — | Stamp card instead of points. |
| `stampGlyph` | `string` | `"✓"` | Glyph in a filled stamp ("☕"). |
| `image` | `ImageSourcePropType` | — | Card art — a photo of the shop, product or a texture. |
| `renderCode` | `(memberId: string) => ReactNode` | — | Draw a real scannable code on the back. |
| `flipped / defaultFlipped / onFlip` | `boolean / boolean / (flipped) => void` | `— / false / —` | Controlled or uncontrolled side. |
| `tilt` | `boolean` | `true` | Tilt toward the finger. |
| `radius` | `number` | `18` | Corner radius. |
| `background` | `string` | `"#2b1f17"` | Card colour when there is no image. |
| `labels` | `{ ready?, more?, reward?, points?, toNext?, back? }` | `English` | Every built-in string, for translation ({n} and {reward} are filled in). |
| `style` | `StyleProp<ViewStyle>` | — | Style for the root. |
| `className` | `string` | — | Tailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides. |

## Behaviour & accessibility

- **Touch**: Tap the card to flip it to the member code for the till, and tap again to turn it back.
- **Motion**: With tilt on (the default) the card leans toward your finger with a moving reflection, then turns over in 3D on a spring.
- **Screen readers**: The card is a button labelled with the brand, member and their points or stamp count.

## FAQ

### How do I make a stamp card in React Native?

Use ExpoKit's Loyalty Card, a Pro component: with ExpoKit Pro, the ExpoKit CLI copies a ready-made stamp card into your Expo or React Native app as plain TypeScript you can edit. It works on iOS, Android and web, and in Expo Go.

### Does Loyalty Card work in Expo Go?

Yes. Loyalty Card runs in Expo Go on iOS and Android with no development build — its packages (react-native-svg) are all included in Expo Go.

### How do I add Loyalty Card to my Expo app?

With ExpoKit Pro, add it with the ExpoKit CLI: it copies the component's source into your app and installs react-native-svg, so the code is yours to change. The install command is on this page for Pro members.

### Is Loyalty Card free?

Loyalty Card is part of ExpoKit Pro. With a Pro plan, log the CLI in once and it installs the full source into your app.

## More

- Live preview, variants and code: https://expokit.in/docs/components/loyalty-card
- Every ExpoKit component, screen, template and chart: https://expokit.in/llms.txt
- Install commands and props for every free component: https://expokit.in/llms-full.txt
- Pricing: https://expokit.in/pricing
