Interactive Credit Card
A production-scale, light + dark Interactive Credit Card component. Copy-paste via the CLI; you own the code.
npx lerpa-cli add interactive-credit-cardLive preview available in the gallery.
Usage
import { InteractiveCreditCard } from "@lerpa/ui";
<InteractiveCreditCard />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| cardNumber | string | — | |
| cardName | string | — | |
| expiry | string | — | |
| cvv | string | — | |
| focusedField | "number" | "name" | "expiry" | "cvv" | null | — | |
| onCardTypeChange | (type: string) => void | — | |
| className | string | — | |
| showForm | boolean | — |
Accessibility
- Keyboard accessible interactive elements.
- Respects prefers-reduced-motion where animated.
- Color is never the only signal.