Component packs › Tender › Pay Button

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.

Pay Button props

PropTypeDefaultDescription
amountnumber
currencystring
labelstring
pay() => Promise<unknown>waits 1.4 sYour payment call. Default: waits 1.4 s. Reject to show the failure.
resetAfternumber | false
onPaid() => void
autoplaynumber | falseShowcase mode: presses itself every N ms while visible (every third one fails).

Methods on the ref

Use it in React

import PayButton from './PayButton';

<PayButton />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Tender

Good for: Pricing and payment.