Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

react-svg-credit-card-payment-icons

marcovoliveira34.7kMIT3.1.1TypeScript support: included

React components library with 6 styles, 80 icons, TypeScript support, and a variety of types and formats for easy integration into React applications.

paypal, svg, paymenticons, mastercard, credit-card, icons, react, credit, components, typescript, logos, brands, icon, react-component, visa, card, payment

readme

React SVG Card Payment Icons

npm TypeScript ​npm​ PRs Welcome GitHub stars

SVG Credit Card & Payment Icons: 6 Styles, 80 Icons for React ⚛️

A collection of SVG based credit card logo icons. React componnent with Typescript support.

Live Demo

💿 Installation

1) Install this package:

npm install react-svg-credit-card-payment-icons
# or
yarn add react-svg-credit-card-payment-icons

📦 Usage

import { PaymentIcon } from 'react-svg-credit-card-payment-icons';

....

const App = () => {
  return (
    <PaymentIcon type="visa" format="flatRounded" width={100} />
  );
};

Types and Formats

Available types and their images:

If the type does not exist, the default setting is generic.

Type Image
alipay
amex
diners
discover
elo
hiper
hipercard
jcb
maestro
mastercard
mir
paypal
unionpay
visa
generic
code
codefront

Images from aaronfagan/svg-credit-card-payment-icons

Available formats:

If the format is not specified, the default setting is flat.

Format Image
flat
flatRounded
logo
logoBorder
mono
monoOutline
  • Specify either width or height; there's no requirement to define both. The aspect ratio is preset at 780:500 for SVGs. If neither width nor height is defined, width will default to 40.

  • The component also allows all the properties (props) of the Svg component, including attributes like style.

  • If an invalid type is provided, the default setting is generic.

changelog

react-svg-credit-card-payment-icons

3.1.0

Minor Changes

  • update readme

3.0.0

Major Changes

  • Thanks to Adrian Rubio we have mastercard, maestro and visa new cards frollowing brand guidelines, also added code front, code and generic to logo-border and logo types. PaymentTypesExtended is deprecated and you should use PaymentTypes type that contains the same set of types.

2.1.3

Patch Changes

  • update readme

2.1.2

Patch Changes

  • fix docs add string formatting

2.1.1

Patch Changes

  • storybook fix

2.1.0

Minor Changes

  • 87db82a: Update svg
  • Storbook demo app

2.0.0

Major Changes

  • 5b5c788: SVG generation

Minor Changes

  • 44c93de: SVG build

1.0.1

Patch Changes

  • df73860: Update github jobs
  • 8a0f7d9: readme update
  • d04521e: versioning