Automatic card type detection
Robust input field masking
Compatible with Stripe
Mobile and tablet friendly
Customisable and Themeable
Open Source and Free
bower install card-js
Below are some examples of how to use Card Js. Once you've imported the Card Js library, simply copy and paste the code given next to an example into your project.
Number | Card Type |
---|---|
4242 4242 4242 4242 | Visa |
5555 5555 5555 4444 | MasterCard |
3782 822463 10005 | American Express |
6011 1111 1111 1117 | Discover |
3056 930902 5904 | Diners Club |
3530 1113 3330 0000 | JCB |
<div class="card-js"></div>
<div class="card-js" data-capture-name="true"> </div>
<div class="card-js" data-capture-name="true" data-icon-colour="#158CBA"> </div>
<div class="card-js" data-stripe="true> </div>