Skip to content
WunderUI

Payment Logos

Pro

Payment methods as small card-shaped logos: Visa, Mastercard, Amex, SEPA, Apple Pay, Google Pay, PayPal, Klarna and bank transfer, one at a time or as the row of methods a shop accepts.

Playground

Installation

Payment Logos comes with WunderUI Core and Pro, in the package from your plan. See the plans.

Then import what you need:

tsx
import {
  PaymentLogo,
  PAYMENT_LOGOS,
  PAYMENT_METHODS,
  PaymentLogoName,
  PaymentLogoProps,
  PaymentMark,
  PaymentMarkProps,
  PaymentMethod,
  PaymentMethods,
  PaymentMethodsProps,
  resolvePaymentLogo,
} from "@wunderui/react"

Then use it:

tsx
import { PaymentLogo, PaymentMethods } from "@wunderui/react"

export function Payment() {
  return (
    <div className="flex flex-col gap-3">
      <span className="flex items-center gap-2 text-sm">
        <PaymentLogo name="Visa" label="" />
        Visa •••• 4242
      </span>
      <PaymentMethods methods={["Visa", "Mastercard", "PayPal", "Klarna"]} />
    </div>
  )
}

Expected result: You see a Visa logo beside the text Visa •••• 4242 and under it a row of four logos: Visa, Mastercard, PayPal and Klarna.

When to use

Use Payment Logos for

  • The accepted methods under a pay button or in a shop footer
  • The method of a saved card, an invoice or a transaction row
  • A method in a table cell, at the small size

Use something else for

  • Brand Logo for the logo of a product or service that is not a payment method
  • Radio Group for choosing one payment method
  • Selector Item for a list of methods to pick from, each with a description

Methods

Every logo sits on a card in the brand's colour, or on the card token for bank transfer. Pass the method as `name`; the logo is an image named after it.

Size

`md` (32 × 20) is the default, for forms, lists and the row of accepted methods. `sm` (24 × 15) fits table cells and dense rows.

Row

PaymentMethods turns a list of names into a row of logos. It knows the short spellings (VISA, MC, AMEX); a name without a logo, such as Invoice, stays a text chip of the same height.

Width

The row has no width of its own. When the parent is narrower than the logos, they wrap with 6 px between lines and logos, and nothing is cut off.

Behavior and motion

What the logos do with their name, size and colours. They are display only: no hover, focus, keyboard or loading behaviour.

An image, not a control
PaymentLogo is a span with the image role and the method's name as its accessible name. It has no focus stop and a click does nothing.
Names and short spellings
PaymentMethods maps the names people write (VISA, MC, AMEX, American Express, Apple Pay …) to their logo with resolvePaymentLogo. Any other name, such as Invoice or Swish, shows as a text chip as high as the logos.
Screen readers
The row is announced as the group Accepted payment methods, then each logo by its method name, such as Visa or Mastercard. With label="" a logo is hidden.
Size and wrapping
md is 32 × 20 and sm 24 × 15. The row is as wide as its parent and wraps 6 px apart, so nothing is cut off.
Colour and dark mode
The card colours are the brands' own and stay the same in dark mode. The black Apple Pay card gets a light rim in dark mode, and bank transfer uses the card and border tokens.
Motion and reduced motion
Nothing is animated, so there is nothing to reduce under reduced motion.

Anatomy

The parts of one logo, numbered in the figure, drawn larger than real size. PaymentMethods lays several of them out in a row.

  • data-slot="payment-logo"

    A span with the image role and the method's name: a 32 × 20 card (24 × 15 at sm) with 4 px corners, in the brand's colour or the card token, that clips its artwork.

  • An SVG on a 32 × 20 grid: the brand's mark or wordmark, or a bank in the secondary text colour for bank transfer. Hidden from screen readers; the card carries the name.

  • data-slot="payment-methods"Optional

    A group named Accepted payment methods that turns a list of names into a wrapping row of PaymentLogo, 6 px apart. A name without a logo becomes a text chip of the same height.

  • data-slot="payment-methods-chip"Optional

    A text chip for a name without a logo, such as Invoice: as high as the logos, with a border, the card fill and the name in 10 px medium text.

  • Optional

    The old name of PaymentLogo, kept as a deprecated alias so existing code keeps working.

Best practices

  • Do

    Pass label="" when the text beside the logo already names the method, such as Visa •••• 4242, so a screen reader does not read it twice.

  • Do

    Show only the methods you accept, and change the row by market. The default row is Visa, Mastercard, Amex, PayPal, Apple Pay and Klarna.

  • Do

    Put a short line such as Secure checkout above the row, so it is clear what the logos mean.

  • Don’t

    Don't use the logos to choose a method. They are images; use Radio Group or Selector Item for the choice and put a logo inside each option.

  • Don’t

    Don't recolour the logos. The card colours are the brands' own and are the one documented exception to the token rule.

  • Don’t

    Don't pass the same name twice to PaymentMethods. The name is the React key, so a repeat logs a warning.

API reference

PaymentLogo renders a span and PaymentMethods a div with the group role; both pass every other attribute of their element on. PaymentMark, PaymentMarkProps, PaymentMethod and PAYMENT_METHODS are the old names and still work.

A group named Accepted payment methods that turns a list of names into a wrapping row of PaymentLogo, 6 px apart. A name without a logo becomes a text chip of the same height.

PropTypeDefaultDescription
methodsstring[]["VISA", "MC", "AMEX", "PayPal", "Apple Pay", "Klarna"]The accepted methods, in this order. Known names and short spellings show their logo, any other name a text chip. , , , , and by default.
size"sm" | "md""md"The size of every logo in the row: (default) or .

The old name of PaymentLogo, kept as a deprecated alias so existing code keeps working.

PropTypeDefaultDescription
name required"PayPal" | "Visa" | "Mastercard" | "Amex" | "SEPA" | "Apple Pay" | "Google Pay" | "Klarna" | "Bank transfer"—Which payment method.
labelstring—Accessible name. Defaults to the method name; pass "" when the text beside it already names it.
size"sm" | "md"— 24 × 15 for table cells and dense rows, 32 × 20 for forms, lists and the accepted-methods row. Default .

Notes for AI

Give your coding assistant the Markdown reference instead of screenshots.

MCPget_component("payment-logos")
InstallIncluded in Core and Pro

The full library index for assistants is at /llms.txt.