Get started with cardkit CDN

MIT licensed

Cardkit: Lightweight library for customizable payment forms .

Tags:
  • image
  • editor
  • simple

Stable version

Copied!

How to start using cardkit CDN


<!DOCTYPE html>
<html>
<head>
  <title>Get started with cardkit CDN - cdnhub.io</title>
  <script src="https://cdn.cdnhub.io/cardkit/3.0.0/cardkit.js"></script>
  <style>
    .card {
      width: 300px;
      margin: 0 auto;
    }
  </style>
</head>
<body>
  <div id="card-container" class="card">
    <script>
      const card = new cardkit.Card({
        number: "4532 0262 3531 4712",
        expiry: "12/24",
        cvc: "123",
        holderName: "John Doe",
        brand: cardkit.Brand.VISA,
      });

      document.getElementById("card-container").appendChild(card.element);
    </script>
  </div>
</body>
</html>
Copied!
Copied!
Copied!
Copied!

All versions