Toast Notifications That Print as a Receipt interactive section
React toast notification component: toast notifications drawn as a till receipt: each notice feeds out of a small printer in jerks with the real time on it, earlier ones ride up the paper, and any of them can be dismissed.
Features
- Each notice feeds out of the printer's slot in steps, like paper, not in a smooth slide
- Earlier notices ride up the strip under a torn, toothed top edge
- Every notice is printed with the real time, a title, a detail line and an optional figure
- Dismiss one and the paper closes over the gap, or tear the whole strip off
- The list is a live region, so new notices are announced; every dismiss button is labeled
- The strip keeps the last four notices; printing skips its animation for reduced motion
Best for: Point-of-sale, order and payment products, or any app that wants its notifications to feel like part of the product.
Installation
npm install motion lucide-react clsx tailwind-mergeThen copy the files from the Code tab into the same paths in your project, in TypeScript or JavaScript.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | - | The headline. |
| description | string | - | The line under the headline. |
| notices | ReceiptNotice[] | - | What can be printed: the button's label, then the title, detail and optional figure. |
| labels | object | - | The dismiss label, the printer's idle line and name, and the tear-off action. |
| className | string | - | Classes on the section. |
FAQ
Is the Toast Notifications That Print as a Receipt interactive section free to use?
Yes. Toast Notifications That Print as a Receipt is free to copy into your own projects. Open the Code tab and paste the files into your app.
Does Toast Notifications That Print as a Receipt work with Next.js and React?
Yes. It's a React client component made for the Next.js App Router, styled with Tailwind CSS and animated with Framer Motion (the motion package).
Can I use Toast Notifications That Print as a Receipt in JavaScript instead of TypeScript?
Yes. Every file comes in TypeScript and JavaScript. Switch the language in the Code tab.
What does Toast Notifications That Print as a Receipt need installed?
motion, lucide-react, clsx, tailwind-merge, plus the shared helpers from the Installation page.
Is Toast Notifications That Print as a Receipt accessible?
Every link and button is reachable by keyboard with a visible focus ring, and the animation stays still for visitors who ask for reduced motion.
