Component packs › Tender › Pay Button
Press pay and the amount chip travels across the button while the payment runs, the fill following it, and lands as “Paid”.
Pay Button is a button from Tender, a component pack with 6 payment components: Payment components where you watch the money move. Price: $2 for the whole pack.
Built with: amount carried through, declined slides back, async pay.
Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.
| Prop | Type | Default | Description |
|---|---|---|---|
amount | number | ||
currency | string | ||
label | string | ||
pay | () => Promise<unknown> | waits 1.4 s | Your payment call. Default: waits 1.4 s. Reject to show the failure. |
resetAfter | number | false | ||
onPaid | () => void | ||
autoplay | number | false | Showcase mode: presses itself every N ms while visible (every third one fails). |
readonly state: 'idle' | 'paying' | 'paid' | 'failed'press(): voidreset(): voiddestroy(): voidimport PayButton from './PayButton';
<PayButton />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Pricing and payment.