Skip to content

Payment Card

Beta
Get Ritla UI

A bank card face in Graphite, Light or Brand, and a stack of them; printed left to right in every language.

Preview

Mirrored is the same English content laid out right to left: it separates a mirroring bug from a translation one.

PreviewCode
EnglishMirroredArabic
LTR →

Installation

  1. Add the component

    npx ritla add payment-card

    Also works with shadcn: npx shadcn@latest add @ritla/payment-card

  2. Or copy by hand

    Installing by hand copies the component's source into your project. The source comes with a Ritla UI license, so the CLI is the short way to the same files.

Usage

payment-card.tsx
import { CardStack, PaymentCard } from "@/components/ui/payment-card";<PaymentCard kind="Debit" last4="8152" holder="Noor Al-Hassan" expiry="08/29" mainLabel="Main card" label="Debit card ending in 8152" />

Examples

Card stack

EnglishMirroredArabic
LTR →

API reference

PaymentCard

PropTypeDefaultDescription
variant"graphite" | "light" | "brand""graphite"Figma's Style.
issuerstring"Ritla"The issuer's name, top start, and the soft watermark.
kindReactNodeNoneThe card type, top end (“Debit”).
last4 / holder / expirystringNoneThe last four digits, the name as printed and MM/YY.
mainLabelReactNodeNoneFigma's Main: the “Main card” badge, in the page language.
labelstringNoneWhat a screen reader hears for the whole card.

CardStack

PropTypeDefaultDescription
childrenReactNodeNonePayment cards, front card first; up to three are drawn.

Accessibility

ARIA

  • A card is one image (role="img") named by label (“Debit card ending in 8152”), so the dots and the chip are never read.
  • In a stack, only the front card is exposed; name it for the whole stack.

Arabic and RTL notes

Mirrors

  • Nothing on the face: a printed card reads the same in every language.

Does not mirror

  • The whole face stays left to right (dir="ltr"): issuer at the left, the number and expiry where a real card has them.
Numerals
Card numbers and expiry dates stay in Latin digits: they are identifiers, copied as printed.
Arabic typography
Pass the holder in Latin capitals, as embossed on the card.