Sign in

npm install --save react-credit-cards

Features

import React, {useState  } from "react";import Cards from "react-credit-cards";import 'react-credit-cards/es/styles-compiled.css'function App() {const [number , setNumber] = useState(" ")const [name , setName] = useState(" ")const [expiry , setExpiry] = useState(" ")const [cvc , setCvc] = useState(" ")const [focus , setFocus] = useState(" ")return (<div className="App"><Cardsnumber={number}name={name}expiry={expiry}cvc={cvc}focused={focus}/><form><inputtype ="tel"name='number'placeholder="Card Number"value={number}onChange={e => setNumber(e.target.value)}onFocus={e => setFocus(e.target.name)}/>




Viplavjha

Fall in love with losing then you won't be scared.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store