React Native Credit Card 💳
A better credit card form for React Native
React native port of the display of Card by @jessepollak
This is a react native port of Card. There is a react port of Card, but it still renders on browser DOM (which is not as good as native view), so this library will take advantage of both.
- Look like Card.
- Provide a react interface for displaying credit card information.
npm install --save react-native-credit-card
- In your react native script add these lines
import CreditCard from 'react-native-credit-card';<CreditCard==========/>
cvc: number(max 4 characters, will cut the rest)(The "/" will be automatically added)
name: string (max 2 lines)
number: credit card number(max 16 characters, will cut the rest)
expiry: number(max 4 characters, will cut the rest)
imageFront: image(image file for the card front card background -- with require)
imageBack: image(image file for the card back card background -- with require)
shiny: boolean(show sticker)
bar: boolean(show bar on the back)
focused: one of the above fields
- cvc (Upon focusing cvc, the form will be rotated until this is changed.)
type: Available in case you need to explicitly specify the card type. In most cases this will be inferred for you as the user fills the form, so you won't need to use it. One of the following:
- Automated test
- More credit card type variations