# @types/react-credit-cards

> TypeScript definitions for react-credit-cards

Latest version **0.8.4** (published 2023-11-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/react-credit-cards
pnpm add @types/react-credit-cards
yarn add @types/react-credit-cards
bun add @types/react-credit-cards
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.8.4 |
| Published | 2023-11-21 |
| First published | 2018-04-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/react-credit-cards
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-credit-cards
- npm.io page: https://npm.io/package/@types/react-credit-cards

## Dependencies (1)

- [@types/react](https://npm.io/package/@types/react.md) *

## Recent versions

- 0.8.4 (latest) — 2023-11-21
- 0.8.1 (ts3.6) — 2021-07-08
- 0.8.0 (ts2.8) — 2019-03-09
- 0.7.0 (ts2.7) — 2018-04-18
- 0.8.3 — 2023-11-07
- 0.8.2 — 2023-10-18
- 0.7.2 — 2018-08-18
- 0.7.1 — 2018-08-04

## README

# Installation
> `npm install --save @types/react-credit-cards`

# Summary
This package contains type definitions for react-credit-cards (https://github.com/amarofashion/react-credit-cards).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-credit-cards.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-credit-cards/index.d.ts)
````ts
import * as React from "react";

export interface CallbackArgument {
    issuer: string;
    maxLength: number;
}

export type Focused = "name" | "number" | "expiry" | "cvc";

export interface ReactCreditCardProps {
    acceptedCards?: readonly string[] | undefined;
    callback?: ((type: CallbackArgument, isValid: boolean) => void) | undefined;
    cvc: string | number;
    expiry: string | number;
    focused?: Focused | undefined;
    issuer?: string | undefined;
    locale?: { valid: string } | undefined;
    name: string;
    number: string | number;
    placeholders?: { name: string } | undefined;
    preview?: boolean | undefined;
}

declare class ReactCreditCard extends React.Component<
    ReactCreditCardProps,
    never
> {}

export default ReactCreditCard;

````

### Additional Details
 * Last updated: Mon, 20 Nov 2023 23:36:24 GMT
 * Dependencies: [@types/react](https://npmjs.com/package/@types/react)

# Credits
These definitions were written by [Vytautas Strimaitis](https://github.com/vstrimaitis), [Ole Frank](https://github.com/olefrank), and [zzanol](https://github.com/zzanol).

---
_Source: https://npm.io/package/@types/react-credit-cards · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
