A receipt
Pinked at both ends, typed, the lines a description list. The total is bigger; nothing else is.
Thermal till paper: pinked (or perforated, or torn) at both ends, printed in the typewriter font, its lines a description list, its total circled in red felt tip by whoever checked it, ending in a barcode made from the number under it.
npx shadcn@latest add @wobko/receiptFirst time here? Add the registry to components.json first. How to install
Pinked at both ends, typed, the lines a description list. The total is bigger; nothing else is.
The total circled in red felt tip, a barcode whose bars come from the number under it, and a paper clip to keep it with the invoice.
`ends` is the cut of both ends: the tear bar's sawtooth, a perforation, a hand tear, or a plain guillotine.
A real checkout: quantities you can change, a total that follows, and the barcode of the order number. The receipt is ordinary DOM; only the ink is drawn.
A Paper on the `receipt` stock, a centered 18 rem column with the type font. It takes every Paper prop except `stock`, `rules` and `edge`.
| Prop | Type | Default | Description |
|---|---|---|---|
| ends | "zig" | "perf" | "torn" | "cut" | "deckle" | "crimp" | "scallop" | "zig" | The cut of both ends: the tear bar's sawtooth, a perforation, torn, or plain. |
One item: a `div` holding a `dt` (the item; a long name wraps onto a second line, as a thermal printer would, and never hides behind an ellipsis) and a `dd` (the price, tabular figures, aligned to the end, on the first line).
| Prop | Type | Default | Description |
|---|---|---|---|
| qty | number | - | How many, printed before the item as `2 x`. |
| price | ReactNode | - | The price. |
A `dl` of its own (label and amount, larger and bold).
| Prop | Type | Default | Description |
|---|---|---|---|
| label | ReactNode | "TOTAL" | The label. |
| circled | boolean | "red" | "blue" | "ink" | false | Circle the amount in felt tip. `true` is red. Calm density draws a hairline loop. |
| seed | string | number | - | Pins the hand of the loop. |
Bars from `value` in a `figure` with the number printed under them. The same number always prints the same bars, on the server and in the browser.
| Prop | Type | Default | Description |
|---|---|---|---|
| value | string | - | The number. |
| height | number | 44 | Bar height in px. |
The files the CLI copies into your project.
Loading the source