Receipt Print Toast
Order confirmations that print: a thermal printer slot blinks, then a strip of receipt paper feeds out line by line in little stepped jolts with a torn zig-zag edge. After a few seconds it tears off and drops away; hover or focus holds it.
Try it: Press "Place order" to print a receipt; hover to hold it.
Installation
Install with the shadcn CLI:
npx shadcn@latest add https://www.framekitui.live/r/receipt-print-toast.jsonOr, with the @framekit namespace registered: npx shadcn@latest add @framekit/receipt-print-toast. You can also copy the source into components/ui/receipt-print-toast.tsx (view on GitHub).
Usage
import { ReceiptPrintToast } from '@/components/ui/receipt-print-toast'Props
| Prop | Type | Default | Notes |
|---|---|---|---|
receipt | Receipt | null | — | { title, subtitle?, lines: { label, qty?, amount }[], total?, footer? } — prints whenever the object changes. |
samples | Receipt[] | DEFAULT_RECEIPTS | Orders cycled by the built-in trigger. |
triggerLabel / showTrigger | string / boolean | 'Place order' / true | Built-in trigger button. |
duration | number | 6000 | ms before it tears off (0 = until dismissed); paused on hover / focus. |
onDismiss | (receipt) => void | — | Fires when a receipt tears off or is dismissed. |
Dependencies
motionlucide-react
Related Toast components
- Gravity Stack Toast
Gravity-bounce stack with provider/hook.
- Sonar Ping Toast
Expanding sonar rings on appear.
- Ribbon Unfurl Toast
Ribbon unfurl enter animation.