Skip to content

No.96 · Cards· New

Card Wallet

Virtual cards as a small physical stack: the chosen card sits in front, its details stay masked until asked for and hide again on a visible countdown, and a frozen card is hatched like a voided cheque.

The prompt

Copy this text

Automatic copying is unavailable. Copy the selected text using your device’s copy command.

Written for the variant you picked above: Dark

Build a virtual-card wallet in a dark, precise fintech style: near-black page #0b0b0c, panels #121214, hairlines rgb(255 255 255 / 0.08), text #ededed and muted #8d8d93, Inter with tabular numbers, one restrained periwinkle accent #8b93ff. Two columns from 46rem (stack and list left, details right), one below. The stack: up to four flat card faces (credit-card ratio 1.586, 14px corners, a 1px inner highlight and a soft drop shadow) share one grid cell. The selected card is in front; each card behind is lifted 14px, scaled down 5% and darkened 12% per step, so the stack reads as depth, and every face transitions between positions over 420ms because the DOM order never changes (z-index follows the selection). Faces are solid colours (graphite, ink blue, plum, moss, sand) with the nickname, a small 'VIRTUAL' label, a translucent chip, '•••• 4821' and the expiry. A frozen card gets a fine 135° hatch over its face and a 'FROZEN' pill. Under the stack, a radio list of cards: a 22×15 colour swatch, nickname, '•••• 1907 · Frozen', and spend this month. The details panel: nickname and holder, '$13,420.50 of $15,000.00 this month' over a 6px meter (amber above 85%), then a hairline grid of Card number (full width), Expires and CVC, masked until 'Show details'. Revealed values blur in, each gets a Copy button, and the button becomes 'Hide details' with a 16px ring that drains over 30 seconds before the details mask themselves again. Beside it a 'Freeze card' switch. Selected variant — Dark (dark): Dark theme: page #0b0b0c, panels #121214, raised rows #18181b, text #ededed, muted #8d8d93, faint #5b5b61, hairlines rgb(255 255 255 / 0.08) and 0.16 for stronger ones, accent #8b93ff, warning amber #f5a524, error #ff8a80. Card faces: graphite #1f1f23, ink #1a2554, plum #3b2049, moss #22382b, sand #ddd3c3 with dark text. This selection takes precedence over references to other themes or options in the general brief. Implement this selected appearance; do not add a variant picker or alternative appearances unless requested. Implementation requirements: Use React and TypeScript. Keep the component self-contained, with uniquely scoped CSS and no animation libraries. Include required imports, styles and font setup in the result. Interaction: Show details awaits reveal(id) (your server, after any step-up); it's disabled while pending and for frozen cards, and failures show a message. Details re-mask on the countdown, on Hide, or when another card is chosen. The freeze switch flips immediately, calls onFreeze, and rolls back with an explanation if it rejects. Copy confirms only after the clipboard accepts. Motion: Faces move between stack positions over 420ms; revealed numbers fade in from a 3px blur; the countdown ring drains linearly; the switch thumb slides in 200ms. Reduced motion keeps the stack static and removes the blur and slides. Accessibility: The stack is decorative (aria-hidden); a fieldset of real radio buttons chooses the card. The details are a section labelled by the nickname; spend is a meter with a spoken value; Freeze is a role=switch with aria-checked; the countdown is described in hidden text and the status line announces failures. Responsive behavior: Side by side from a 46rem container, stacked below; the card number on the face scales with the container. Touch: Everything is a tap target; nothing depends on hover. Preserve keyboard access, visible focus and reduced-motion behavior. Keep fictional demo data and simulated service calls in a separate usage example; expose callbacks for real actions and recover from rejected requests. Keep usage-example links inside the demo: use local buttons or prevent navigation. Demonstration links must not navigate to Vitrine routes or open other pages; preserve real URL support in the reusable component itself. Verify the result at narrow and wide viewport sizes, with keyboard input and reduced motion enabled.

Notes

Interaction
Show details awaits reveal(id) (your server, after any step-up); it's disabled while pending and for frozen cards, and failures show a message. Details re-mask on the countdown, on Hide, or when another card is chosen. The freeze switch flips immediately, calls onFreeze, and rolls back with an explanation if it rejects. Copy confirms only after the clipboard accepts.
Motion
Faces move between stack positions over 420ms; revealed numbers fade in from a 3px blur; the countdown ring drains linearly; the switch thumb slides in 200ms. Reduced motion keeps the stack static and removes the blur and slides.
Accessibility
The stack is decorative (aria-hidden); a fieldset of real radio buttons chooses the card. The details are a section labelled by the nickname; spend is a meter with a spoken value; Freeze is a role=switch with aria-checked; the countdown is described in hidden text and the status line announces failures.
Responsive
Side by side from a 46rem container, stacked below; the card number on the face scales with the container.
On touch
Everything is a tap target; nothing depends on hover.

Featured

333 components