REFERENCE
- Gallery page: https://magpui.com/en/i/top-up-card-with-payment-feedback-eed342
- First frame (image): https://dnioievkvxejjbxgwvko.supabase.co/storage/v1/object/public/media/top-up-card-with-payment-feedback-eed342/shot.jpg
- Clip (mp4): https://dnioievkvxejjbxgwvko.supabase.co/storage/v1/object/public/media/top-up-card-with-payment-feedback-eed342/clip.mp4
- Original post: https://x.com/doriannvdv/status/2118335403552088490 by @doriannvdv
Before building, download the first frame and look at it. If ffmpeg is available, download the clip and extract frames (ffmpeg -i clip.mp4 -vf fps=2 frame-%02d.png), then study the motion frame by frame. Match what you see; the text below describes it, the frames are the truth.
BUILD: Build a compact add-funds panel with amount selection, a fee summary and an explicit payment confirmation state. Preserve the context between editing, processing and success; animate a sparse dot field behind the card only while waiting. Do not build a whole banking application.
DESIGN SYSTEM: Center a roughly 360px-wide off-white #FAFAFA card on #F0F0F0. Use neutral sans typography, a 14px heading, 30px amount, 12px gray fee labels and 16px row spacing. Use 18px corners, subtle #E4E4E4 borders and a restrained shadow. Success uses a compact #36A765 check badge, not a full-screen celebration.
MOTION: On amount selection update totals with a 140ms opacity crossfade. On submit preserve the card outline and fade the editable content to processing over 200ms, cubic-bezier(0.2,0,0,1). During processing move sparse low-opacity dots downward behind the card over 1100ms in a clipped region; stop immediately on completion. Scale the check from 0.9 to 1 while fading it in over 240ms, cubic-bezier(0.22,1,0.36,1). No confetti or continuous idle motion.
SECTIONS: Amount controls; fee and total rows; primary action; processing status; success badge and acknowledgement. Include validation, pending and recoverable error states. Do not imply actual money movement in the demo.
IMPLEMENTATION: Use React and Motion for opacity, transforms and state transitions. Keep amounts in integer minor units and format with Intl.NumberFormat. Animate only a bounded number of decorative dots, aria-hidden. Prevent repeat submission, announce completion through a polite live region and keep focus stable. Provide keyboard amount entry and visible focus. Under prefers-reduced-motion use static processing text and immediate state changes. A real payment integration must only show success after its trusted backend confirms it.
ADAPT TO THE PROJECT: Reuse the project's existing design tokens, components and fonts. Map the estimated colors to existing tokens. Never copy logos, brand names, photos or illustrations from the original; use placeholders. All durations and dimensions here are reconstruction targets inferred from the reference, not measured source constants.
SUCCESS CHECK:
- Fees and totals agree after every amount change.
- Loading cannot trigger duplicate submissions and failures allow retry.
- Success and reduced-motion states remain understandable without decorative motion.