KQ-732 · RECEIPT/PRINT
Receipt Print
A till receipt out of a printer mouth. When printing turns on, lines feed out one at a time on a timer that pauses while the tab is hidden, each arriving on flick as the paper grows to a measured height on glide; the last line is a procedural barcode. Once printed the receipt tears: pulling it down follows the hand with resistance and past the tear distance the sheet leaves on the exit ease, a short pull springs back on snap, and a Tear off button tears by keyboard.
KQ-732 · RECEIPT/PRINT
Coldbrook CoffeeReady
Coldbrook Coffee · ready
Install
One command — the source lands in your repo. Or copy it from the Code tab.
$ pnpm dlx shadcn@latest add @kinetiq/receipt-print
Props
- lines
- ReceiptLine[]
- default —
- The lines, top to bottom: { id, label, amount?, kind?: "item" | "total" | "note" }.
- printing
- boolean
- default —
- Turning it on prints from the first line; turning it off clears the mouth for the next receipt.
- onPrinted
- () => void
- default —
- Fires from the timer that printed the last line.
- onTear
- () => void
- default —
- Fires from the release or key that tore the receipt away.
- interval
- number
- default 160
- Milliseconds between lines.
- header
- string
- default "Receipt"
- The merchant's name at the head of the paper; it also seeds the barcode.
- format
- (value: number) => string
- default Intl.NumberFormat("en-US", { style: "currency", currency: "USD" })
- Formats every amount the paper prints.
| Prop | Type | Default | Description |
|---|---|---|---|
| lines | ReceiptLine[] | — | The lines, top to bottom: { id, label, amount?, kind?: "item" | "total" | "note" }. |
| printing | boolean | — | Turning it on prints from the first line; turning it off clears the mouth for the next receipt. |
| onPrinted | () => void | — | Fires from the timer that printed the last line. |
| onTear | () => void | — | Fires from the release or key that tore the receipt away. |
| interval | number | 160 | Milliseconds between lines. |
| header | string | "Receipt" | The merchant's name at the head of the paper; it also seeds the barcode. |
| format | (value: number) => string | Intl.NumberFormat("en-US", { style: "currency", currency: "USD" }) | Formats every amount the paper prints. |