Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
react-credit-card-flipping
Advanced tools
Credit card flipping for ReactJS
npm install react-credit-card-flipping
ou
yarn add react-credit-card-flipping
import React, { useState } from 'react';
import Card from 'react-credit-card-flipping';
export default function App() {
const [cardNumber, setCardNumber] = useState('');
const [cardName, setCardName] = useState('');
const [cardBrand, setCardBrand] = useState('');
const [cardExpiry, setCardExpiry] = useState('');
const [cardCVV, setCardCVV] = useState('');
const [focusCVV, setFocusCVV] = useState(false);
return (
<div id="form">
<Card
number={cardNumber}
name={cardName}
expiry={cardExpiry}
cvv={cardCVV}
flipCard={focusCVV}
/>
<form>
<input
type="tel"
name="number"
placeholder="Card Number"
onChange={(event) => setCardNumber(event.target.value)}
/>
...
<input
type="tel"
name="cvv"
placeholder="CVV"
onChange={(event) => setCardCVV(event.target.value)}
onFocus={() => setFocusCVV(true)}
onBlur={() => setFocusCVV(false)}
/>
</form>
</div>
);
}
property | propType | required | default | description |
---|---|---|---|---|
name | string | yes | Cardholder Name | |
number | string | number | yes | Card number | |
expiry | string | yes | Card expiry date 00/00 | |
cvv | string | number | yes | Card CVC/CVV | |
brand | string | yes | Card brand URL | |
backgroundColor | string | - | #DDD | Card background color when empty |
filledBackgroundColor | string | - | #134869 | Card background color when not empty |
flipCard | boolean | - | false | Flip card when there`s focus or blur on CVV input |
emptyName | string | - | Cardholder Name | Default value when name is empty |
This project is licensed under the MIT License.
Development by: André Coelho
FAQs
Credit card flipping to ReactJS
We found that react-credit-card-flipping demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.