react-native-credit-card-ui-pkg

1.1.1 • Public • Published

react-native-credit-card-ui-pkg

Credit card UI module

This is a fully functional and animated credit card form library, and it's ready to use 🚀

Demo

Support

iOS & Android

Installation

npm i react-native-credit-card-ui-pkg

Usage

import ReactNativeCreditCardUi from 'react-native-credit-card-ui-pkg';


// ...
return (
    //...
    // must set minimum height to 350 units
    // onComplete will trigger once the whole card is filled name, card number, cvv number and expiry date  
    <View style={{height:350}}> 
        <ReactNativeCreditCardUi onComplete={ (todo) => {
                    //...
                    todo = {...todo, number: todo.number.replaceAll(" ",'')}
                    console.log(todo);
                    /**
                     * this will be the return of the onComplate callback
                     {
                        number: XXXX XXXX XXXX XXXX [XXX],
                        expirationMonth: month,
                        expirationYear: year,
                        expiryText: month/year,
                        cvv: XXX[X],
                    }
                    */
                    //...
        }} />
    </View>
)

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT © Naeem ur rehman

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.10latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.10
1.0.80
1.0.70
1.0.60
1.0.50
1.0.40
1.0.30
1.0.20
1.0.10
0.2.90
0.2.100
0.2.80
0.2.70
0.2.61
0.2.50
0.2.40
0.2.30
0.2.20
0.2.10

Package Sidebar

Install

npm i react-native-credit-card-ui-pkg

Weekly Downloads

1

Version

1.1.1

License

MIT

Unpacked Size

514 kB

Total Files

23

Last publish

Collaborators

  • charlieboy350