Swipe Stack, animated React component
Payments to review as a deck of cards. Drag the top card right to approve or left to flag: it tilts as you pull, a stamp fades in, and once thrown the next card rises from the deck.
- Pro
- Cards
- Spring
Play with it
Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.
$4,200
James paid Jackson3h
“rent”5 to review
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| payments | SwipePayment[] | DEFAULT_PAYMENTS | Cards to review, top first: { amount, from, to, note, when, hue }. "Load more" deals the same list again. |
| onDecide | (payment: SwipePayment, approved: boolean) => void | undefined | Called after a card is thrown; approved is true for right / approve and false for left / flag. |
| autoplay | boolean | false | Throws a card every 1.7 s (mostly approvals) and reloads when empty, until someone touches it. |