About
Credit or debit card at ISO size, with embossed text and a flippable back. From chanhdai.com (ncdai), MIT.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Payment Card to your project and fits it to your theme.
Code
How Payment Card is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { PaymentCard, PaymentCardBrand, PaymentCardChip, PaymentCardContactless, PaymentCardExpiry, PaymentCardFront, PaymentCardIssuer, PaymentCardName, PaymentCardNumber } from "@/components/ui/chanhdai-payment-card"
// ---- inlined from src/components/chanhdai-mark.tsx ----
export function ChanhDaiMark(props: React.ComponentProps<"svg">) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 512 256"
aria-hidden
{...props}
>
<path
fill="currentColor"
d="M192 256H64v-64h128v64ZM448 64H320v128h128v64H256V0h192v64ZM64 192H0V64h64v128ZM512 192h-64V64h64v128ZM192 64H64V0h128v64Z"
/>
</svg>
)
}
export function getMarkSVG() {
return `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 256 128"><path fill="currentColor" d="M96 128H32V96h64v32ZM224 32h-64v64h64v32h-96V0h96v32ZM32 96H0V32h32v64ZM256 96h-32V32h32v64ZM96 32H32V0h64v32Z"/></svg>`
}
export default function PaymentCardSavedDemo() {
return (
<ul role="list" className="flex flex-col gap-4">
<li>
<PaymentCard className="w-72">
<PaymentCardFront className="bg-primary text-primary-foreground">
<PaymentCardIssuer>
<ChanhDaiMark />
</PaymentCardIssuer>
<PaymentCardChip />
<PaymentCardContactless />
<PaymentCardNumber value="4242 4242 4242 4242" masked />
<PaymentCardExpiry>12/30</PaymentCardExpiry>
<PaymentCardName>NGUYEN CHANH DAI</PaymentCardName>
<PaymentCardBrand brand="visa" />
</PaymentCardFront>
</PaymentCard>
</li>
<li>
<PaymentCard className="w-72">
<PaymentCardFront>
<PaymentCardIssuer>
<ChanhDaiMark />
</PaymentCardIssuer>
<PaymentCardChip />
<PaymentCardContactless />
<PaymentCardNumber value="5555 5555 5555 4444" masked />
<PaymentCardExpiry>09/29</PaymentCardExpiry>
<PaymentCardName>NGUYEN CHANH DAI</PaymentCardName>
<PaymentCardBrand brand="mastercard" />
</PaymentCardFront>
</PaymentCard>
</li>
</ul>
)
}







