PaymentCard
A drawn payment card face.
Tuppence
ending 4821
Noor HalvorsenExp09/29debit
TuppenceVirtual
ending 0937
Noor HalvorsenExp03/27debit
View code
<PaymentCard label="Everyday card ending 4821" brand="Tuppence" last4="4821"
holder="Noor Halvorsen" expires="09/29" network="debit" />
<PaymentCard label="Online card ending 0937" brand="Tuppence" last4="0937"
holder="Noor Halvorsen" expires="03/27" network="debit" kind="virtual" tone="ink" frozen />Installation
An ordinary dependency: install it, import the theme once, and import the component where it is used.
npm add @sdxc/ui remiximport "@sdxc/ui/theme.css";Usage
import { PaymentCard } from "@sdxc/ui/finance";Renders the card face. Sizes are in container units, so the same card fits a phone's carousel and a desktop column, and the masked number never wraps.
Examples
<PaymentCard label="Online card ending 0937" brand="Tuppence" last4="0937" holder="Noor Halvorsen" expires="03/27" network="debit" kind="virtual" tone="ink" frozen />Props
Read from the component's own types, so every prop, every default and every allowed value is listed.
| Prop | Type | Required | Description |
|---|---|---|---|
label | string | Yes | The card's accessible name, such as "Everyday debit card ending 4821". |
brand | RemixNode | Yes | The issuer's mark or name, top left. |
last4 | string | Yes | The last four digits; the rest of the number is drawn as dots and never passed. |
holder | string | Yes | The cardholder's name as printed. |
expires | string | Yes | The expiry as printed, MM/YY. |
network | string | Yes | The network or product word, bottom right, such as "debit". |
kind | "physical" | "virtual" | No | virtual swaps the chip for a "Virtual" tag. @default "physical" |
virtualLabel | string | No | The tag a virtual card shows. @default "Virtual" |
tone | "brand" | "ink" | "neutral" | No | |
frozen | boolean | No | Frosts the face and shows frozenLabel. @default false |
frozenLabel | string | No | |
expiresLabel | string | No | The printed label before the expiry. @default "Exp" |
Also accepts everything in Omit<TagProps<"div">, "children">.
Types
| Name | Values | What it decides |
|---|---|---|
Tone | "brand" | "ink" | "neutral" | The face's paint: the brand scale, near-black ink, or a light neutral metal. |