Swipe Review
anime.jsA card queue for grading model answers. Drag right to accept, left to reject.
User asked
Can I get GST invoices for last year?
Model answered
Yes. Go to Billing, then Invoices, choose the year and download the PDF bundle.
atlas-m · 0.82 confidence
0 accepted · 0 rejected
Install
$ npx shadcn@latest add https://spotcheckui.com/r/swipe-review.jsonAlso installs animejs.
Usage
import { SwipeReview } from "@/components/spotcheck/swipe-review"
<SwipeReview items={queue} threshold={110} onAccept={markGood} onReject={markBad} />The buttons do everything a drag does, so nobody needs to swipe. A vertical swipe still scrolls the page on phones.
Props
- items * Required
ReviewItem[]Default — - threshold
numberDefault 110How far to drag before a card is decided, in pixels. - onAccept
(item: ReviewItem) => voidDefault — - onReject
(item: ReviewItem) => voidDefault — - className
stringDefault —
Keyboard
| Tab | Reach the Reject and Accept buttons |
|---|---|
| Enter | Grade the top card |
Reduced motion
Cards leave at once, and a short drag returns without a spring.