Applies to every preview on the site.
Installation
One command copies the source into your app — you own the code and can change anything.
After you add the file, import it like any local component:
import { PaymentCard } from "@/components/ui/payment-card";Or add it with the CLI (installs any missing peers):
Usage
useKit(). Wrap your app in <KitProvider accent="#6366f1" radius={14}> to re-skin every component at once.Like this? There's a lot more in Pro Pro
12 full screens built from the same kit — install them the same way.
Props
| Prop | Type | Default |
|---|---|---|
| number Card number (spaces ok). Masked to the last 4 unless masked={false}. | string | — |
| name Cardholder name. | string | — |
| expiry Expiry, e.g. "09/29". | string | — |
| cvv Shown on the back. | string | — |
| brand Brand mark; Amex numbers group 4-6-5. | "visa" | "mastercard" | "amex" | "rupay" | "none" | "visa" |
| bank Issuer name, top-left. | string | — |
| label Small label top-right ("Debit", "Platinum"). | string | — |
| image Card art — a photo or texture (require() or { uri }). Soft, blurred photos look premium. | ImageSourcePropType | brushed graphite |
| tone Light text for dark art, dark text for pale art. | "light" | "dark" | "light" |
| chip EMV chip finish. | "gold" | "silver" | "gold" |
| masked Hide every digit but the last four (any card length). | boolean | true |
| flipped Controlled side (true = back). | boolean | — |
| defaultFlipped Uncontrolled initial side. | boolean | false |
| onFlip Fires when tapped. | (flipped: boolean) => void | — |
| tilt Tilt toward the finger. | boolean | true |
| flippable 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. | boolean | true |
| frozen Dim the card with a Frozen label and ignore taps. | boolean | false |
| radius Corner radius — a real card's corner at phone size. | number | 16 |
| labels Every built-in string, for translation ({bank} and {last4} are filled in). | { cardholder?, validThru?, frozen?, legal?, back?, accessibility? } | English |
| style Style for the root (width, margins). | StyleProp<ViewStyle> | — |
| className Tailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides. | string | — |
Customization
You own the source file — tune appearance with props (no fork required for most tweaks). For brand-wide colours and radius, wrap your app in KitProvider; for one-off looks, use the style props below.
Design theme
Open Design theme on the live preview — accent, corner radius and font update every variant instantly (same as KitProvider in your app).
Variants
Use the variant chips on the preview to switch examples; each maps to a demo you can copy from the Code tab.
Style props
React Native style and typed slots like fieldStyle, plus optional root className when you use NativeWind or Uniwind (cnProps from kit).
- style
- StyleProp<ViewStyle>Style for the root (width, margins).
- className
- stringTailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides.
Map tokens from your design system on Bring your design system or read Theming for KitProvider and NativeWind / Uniwind setup.
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.
Source
FAQ
How do I make a credit card UI in React Native?
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?
react-native-svg) are all included in Expo Go.How do I add Payment Card to my Expo app?
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.