npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

rn-credit-card-ui

v1.1.0

Published

A Credit Card React-Native UI component, it uses **react-native-flip-card** to flip the UI component smoothly and **creditcardutils** to validate the given credit card number.

Downloads

83

Readme

rn-credit-card-ui :

A Credit Card React-Native UI component, it uses react-native-flip-card to flip the UI component smoothly and creditcardutils to validate the given credit card number.

If no type was detected (invalid number), no logo will be shown.


Screens :

screens


Installation :

npm i rn-credit-card-ui
# or if you're using yarn : 
yarn add rn-credit-card-ui

Usage :

import CreditCardUI from "rn-credit-card-ui";

export default function Example(){
    return (
        <CreditCardUI 
            cardNumber="4242424242424242"
            cvc="123"
            holderGender="miss"
            holderName="Maria James"
            expiryDate="11/23"
            bankName={"Bank of Sky"}
            bankLogo={{
                uri:"https://upload.wikimedia.org/wikipedia/commons/thumb/6/6f/Earth_Eastern_Hemisphere.jpg/1024px-Earth_Eastern_Hemisphere.jpg"
            }}
            bankLogoStyle={{
                borderRadius:100
            }}
            isCardNumberShown={false}
            isHorizontalFlipEnabled={true}
            isVerticalFlipEnabled={false}
            dateLabel="VALID"
        />
    )
}

You can also check a more complete example from here


Props :

| Props | Description | Type | Required | Default | | ----------- | ----------- | ----------- | ----------- | ----------- | | frontImage | The card front image | ImageSourcePropType | No | require("./assets/images/cardImg.png") | | backImg | The card back image | ImageSourcePropType | No | require("./assets/images/cardImg.png") | | textColor | The card elements color | string | No | "white" | | cardWidth | The width of the card element | string or number | No | 85% | | cardHeight | The height of the card element | string or number | No | 20% | | isCardChipShown | To show the card chip element or not | boolean | No | true | | bankLogo | Bank logo image | ImageSourcePropType | No | undefined | | bankName | The bank name | string | No | "" | | bankLogoContainerStyle | The style of the view wrapper of the bank's logo and name | ViewStyle | No | undefined | | cardNumber | The credit card number | string | Yes | 4242424242424242 | | expiryDate | The card expiry date | string | Yes | 11/27 | | cvc | The cvc code | string or number | Yes | 123 | | holderName | The credit card holder's name | string | Yes | Maria James | | holderNameStyle | The style of the holder's name text element | TextStyle | No | undefined | | isCardNumberShown | To show the card's number in full format or in secure format | boolean | Yes | true | | holderGender | The card holder's gender status | string | Yes | "mr" | | isHorizontalFlipEnabled | To enable the card element horizontal flip | boolean | No | true | | isVerticalFlipEnabled | To enable the card element vertical flip | boolean | No | false | | cardFrontContainerStyle | The style of font card | ViewStyle | No | undefined | | cardFrontImageStyle | The style of font card image | ImageStyle | No | undefined | | cardBackContainerStyle | The style of card's back side | ViewStyle | No | undefined | | cardBackImageStyle | The style of card's back image | ImageStyle | No | undefined | | cardNumberContainerStyle | The style of card's number view container | ViewStyle | No | undefined | | cardNumberLabel | The card's number label | string | No | "" | | cardNumberLabelStyle | The card's number label style | TextStyle | No | undefined | | cardNumberStyle | The card's number style | TextStyle | No | undefined | | cvcStyle | The CVC style | TextStyle | No | undefined | | cvcLabel | The CVC label | string | No | "" | | cvcLabelStyle | The CVC label style | TextStyle | No | undefined | | dateContainerStyle | The card's expiry date view container style | ViewStyle | No | undefined |
| dateLabel | The expiry date label | string | No | "EXP DATE" | | dateLabelStyle | The expiry date label style | TextStyle | No | undefined | | dateStyle | The expiry date style | TextStyle | No | undefined | | bankNameStyle | The bank's name style | TextStyle | No | undefined | | bankLogoStyle | The bank's logo style | ImageStyle | No | undefined | | cardTypeLogoStyle | The card's type logo style | ImageStyle | No | undefined | | cardChip | The card's chip element | ImageSourcePropType | No | undefined | | cardChipStyle | The card's chip style | ImageStyle | No | undefined | | blackBannerStyle | The card's back side black banner | ViewStyle | No | undefined | | blackBannerStyle | The card's back side black banner | ViewStyle | No | undefined | | whiteBannerStyle | The card's back side white banner | ViewStyle | No | undefined | | onFlipStart | callback to execute when the flip event starts | (isFlipped: boolean) => void | No | ()=>void 0 | | onFlipEnd | callback to execute when the flip event ends | (isFlipped: boolean) => void | No | ()=>void 0 |


Contribution :

Feel free to contribute to this project by sending your custom PR here.