shadcn.io is not affiliated with official shadcn/ui
Payment Processing Stepper Block for Svelte
A four-step hall-deposit payment with method-specific details and a busy lock: while the payment waits, every step button and Back are off, the panel is marked busy and a bar shows progress.
Installation
Overview
Stop people clicking around while a payment is in flight, with this payment stepper for Svelte with Ark UI. A hairline frame with plus marks holds a Steps line of four circles: Method, Details, Confirm and Receipt. Method is a Radio Group of card, bank transfer and digital wallet, each with its fee in cents. Details asks for what that method needs: a card as one joined control with a name, a bank transfer's holder, account number and sort code, or a wallet's email, each checked in a reserved line. Confirm reads the deposit back. "Pay deposit" is the block's one Shine Button: it keeps its size under a spinner for 800 ms, and meanwhile every step button and Back are off, the panel is marked busy and a bar and the foot line say "Processing, this takes a moment." Then the Receipt opens and its heading takes focus.
FAQ
What exactly is locked while it processes?
The paying state turns off all four step buttons, Back and the primary, marks each panel aria-busy, makes the fields read-only and lets only the one-shot timer move on. Pressing Enter does nothing while it waits. When the timer ends the Receipt opens and focus goes to its heading, because a busy button drops focus.
Is this a real card form?
No. It checks a card in the tab's memory (brand by the first digits, the Luhn sum, the expiry against a fixed month, the CVC length) so you can see the pattern. A real page never lets card digits reach its own code and uses the fields your payment provider hosts. The test card 4242 4242 4242 4242 passes with any future expiry; "Use the test card" fills it.
How are fees and the total handled?
In integer cents: the deposit is DEPOSIT (7,500) and each method adds its own fee in cents. usd is the only place cents become dollars, so the method cards, the confirmation and the receipt always agree.
What stays local, and how do I make it real?
Everything. The 800 ms wait is a single timer and no payment is taken: the receipt says so. After paying, the card digits and bank details are wiped and only the method and its last digits are kept. To make it real, call your provider from the submit handler on Confirm, keep the busy state until it answers, and open the Receipt or an error from its result.