Skip to content

Card brand ​

A payment-brand logo on its own chip. Self-hosted SVGs, no payment SDK.

Open in demo
Open in demo

Usage ​

brand is one of visa, mastercard, amex or paypal. The marks are self-hosted SVGs; nothing is loaded from a payment provider.

The chip is white in both color modes, deliberately. These are brand marks rather than icons: Visa is navy on white and Amex is white on blue, so on the page's own surface one of them disappears in each theme. The border carries the theme instead.

The mark is contained inside a fixed box, because the four assets have different aspect ratios and would otherwise each end up a different size.

Examples ​

In a list of payment methods ​

API ​

Source: src/shared/components/common/SaCardBrand.vue

Props ​

PropTypeDefaultDescription
brand'visa' | 'mastercard' | 'amex' | 'paypal'requiredPicks the mark.
labelstring—The alt text. Falls back to the brand's own name, such as "American Express".

Emits ​

None.

Slots ​

None.

Accessibility ​

  • The mark has real alt text, the brand's name, because a card ending in four digits does not say which network it is on.
  • The chip does not shrink, so a row of cards keeps its rhythm whatever is beside it.
  • The image loads lazily and decodes asynchronously.