abadi199/elm-creditcard/2.0.0

NOTE: this package is not compatible with Elm 0.19.1

CreditCard.Components.Card

Card component that will renders the credit card information such as the number, full name, expiration month/year, ccv, and the card logo. This component also provide a card flipping animation for flipping back and forth between the front and back side of the card when displaying CCV number. Some type of card has CCV printed on the front side of the card, in this case, the flipping animation will not be performed.

View

cardView : Model Msg -> Html Msg

A view function that will render the credit card.

To use this view, just include this function as part of your view function. This will render the card as svg element.

Example:

form []
    [ Html.App.map CreditCardMsg (CreditCard.Components.Card.cardView model.creditCardModel)
    , button [] [ text "Checkout "]
    ]