# Payment Card — React Native component for Expo

> A bank card that tilts toward your finger and flips on tap to its back.

A realistic bank card on any photo or texture — gold or silver EMV chip, contactless mark, embossed number and the real Visa / Mastercard / Amex / RuPay marks. It tilts toward your finger with a moving reflection and flips on tap to the back: magnetic stripe, signature panel with the CVV and a hologram. Frozen state for card controls.

- Docs: https://expokit.in/docs/components/payment-card
- Tier: Free
- Also called: credit card UI, card wallet, bank 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
- Variants: Wallet Screen, Card Controls, Choose Design, Add Card

## Installation

Run once per project: `npx @expokit/cli@latest init` (shared theme + KitProvider). Then:

```bash
npx @expokit/cli@latest add payment-card
```

The CLI copies the source into your project (you own the code) and installs react-native-svg.

Import: `import { PaymentCard } from "@/components/ui/payment-card";`

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `number` | `string` | — | Card number (spaces ok). Masked to the last 4 unless masked={false}. |
| `name` | `string` | — | Cardholder name. |
| `expiry` | `string` | — | Expiry, e.g. "09/29". |
| `cvv` | `string` | — | Shown on the back. |
| `brand` | `"visa" \| "mastercard" \| "amex" \| "rupay" \| "none"` | `"visa"` | Brand mark; Amex numbers group 4-6-5. |
| `bank` | `string` | — | Issuer name, top-left. |
| `label` | `string` | — | Small label top-right ("Debit", "Platinum"). |
| `image` | `ImageSourcePropType` | `brushed graphite` | Card art — a photo or texture (require() or { uri }). Soft, blurred photos look premium. |
| `tone` | `"light" \| "dark"` | `"light"` | Light text for dark art, dark text for pale art. |
| `chip` | `"gold" \| "silver"` | `"gold"` | EMV chip finish. |
| `masked` | `boolean` | `true` | Hide every digit but the last four (any card length). |
| `flipped` | `boolean` | — | Controlled side (true = back). |
| `defaultFlipped` | `boolean` | `false` | Uncontrolled initial side. |
| `onFlip` | `(flipped: boolean) => void` | — | Fires when tapped. |
| `tilt` | `boolean` | `true` | Tilt toward the finger. |
| `flippable` | `boolean` | `true` | Tap flips the card. false makes a still card (no tilt, no taps) for use inside something tappable, e.g. a CardStack; a controlled flipped still turns it. |
| `frozen` | `boolean` | `false` | Dim the card with a Frozen label and ignore taps. |
| `radius` | `number` | `16` | Corner radius — a real card's corner at phone size. |
| `labels` | `{ cardholder?, validThru?, frozen?, legal?, back?, accessibility? }` | `English` | Every built-in string, for translation ({bank} and {last4} are filled in). |
| `style` | `StyleProp<ViewStyle>` | — | Style for the root (width, margins). |
| `className` | `string` | — | Tailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides. |

## Behaviour & accessibility

- **Touch**: A tap flips the card to its back (stripe, signature panel, CVV, hologram); frozen cards ignore taps. flippable={false} makes a still card for use inside something tappable.
- **Motion**: With tilt on, the card leans toward the finger with a soft glare, and its shadow narrows as it turns edge-on mid-flip.
- **Screen readers**: Read as '{bank} card ending {last4}', plus 'Frozen' when frozen. The number is masked to the last four digits by default.

## FAQ

### How do I make a credit card UI in React Native?

Use ExpoKit's Payment Card: run npx @expokit/cli@latest add payment-card in your Expo or React Native project and it copies a ready-made credit card UI into your app as plain TypeScript you can edit. It works on iOS, Android and web, and in Expo Go.

### Does Payment Card work in Expo Go?

Yes. Payment 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 Payment Card to my Expo app?

Run npx @expokit/cli@latest add payment-card in your project. The CLI copies the component's source into your app and installs react-native-svg, so the code is yours to change.

### Is Payment Card free?

Yes. Payment Card is free: its full source is on this page and the CLI installs it without an account.

## More

- Live preview, variants and code: https://expokit.in/docs/components/payment-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
