Skip to content

Receipt Printer

Pro

An order receipt that prints line by line out of a thermal printer slot, then tears off on its serrated edge when you pull it down.

  • Base UI
  • Motion
  • React 19
  • Tailwind CSS 4

Added Nov 11, 2026 · Pro license

Playground

Loading the preview

Props

Needs your Pro API key in GELATIN_UI_PRO_TOKEN. Set it up

Pro itemAPI key required

Receipt Printer needs a Pro API key

Try the live preview for free. With Pro, the add command above puts the source in your project.

Files it adds
26
More Pro items, one API key
+327
Your coding agent runs it
1 cmd

$79$129once, for life

Already have Pro? Sign in to set up your API key.

Put the printer body, the paper, and the buttons in the root.

The sample also uses Till Receipt. One command adds them with this item:

order-receipt.tsx

ReceiptPrinter

<div>
PropTypeDefaultDescription
autoPrintbooleantruePrints the first time the paper comes into view. Default true.
onPrintEnd—Called when a print ends and the paper rests.
onTear—Called when the paper tears off: a long pull or ReceiptPrinterTearTrigger.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

ReceiptPrinterSlot

<div>
PropTypeDefaultDescription
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

ReceiptPrinterPaper

<div>
PropTypeDefaultDescription
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

ReceiptPrinterTrigger

<button>
PropTypeDefaultDescription
glass"clear""dark""light"—
rounded"default""full"—
size"default""icon""icon-lg""icon-sm""icon-xs""lg""sm""xl""xs"—
variant"dashed""default""destructive""destructive-outline""ghost""link""media""outline""secondary"—
classNamestring—
busyboolean—The button waits for the app (busy words): a spinner, aria-busy, and no clicks. Focus stays on the button. The style hook stays data-loading.
spinnerPlacement"center""start"—center (default): the spinner covers the label. start: it takes the leading icon slot. The icon sizes always use center, because their one icon is the label.
From Base UIButtonBase UI docs
focusableWhenDisabledbooleanfalseWhether the button should be focusable when disabled.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
style—Style applied to the element, or a function that returns a style object based on the component's state.
...props<button> attributes—Every other attribute goes to the <button>, with a ref.

ReceiptPrinterTearTrigger

<button>
PropTypeDefaultDescription
glass"clear""dark""light"—
rounded"default""full"—
size"default""icon""icon-lg""icon-sm""icon-xs""lg""sm""xl""xs"—
variant"dashed""default""destructive""destructive-outline""ghost""link""media""outline""secondary"—
classNamestring—
busyboolean—The button waits for the app (busy words): a spinner, aria-busy, and no clicks. Focus stays on the button. The style hook stays data-loading.
spinnerPlacement"center""start"—center (default): the spinner covers the label. start: it takes the leading icon slot. The icon sizes always use center, because their one icon is the label.
From Base UIButtonBase UI docs
focusableWhenDisabledbooleanfalseWhether the button should be focusable when disabled.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
style—Style applied to the element, or a function that returns a style object based on the component's state.
...props<button> attributes—Every other attribute goes to the <button>, with a ref.
  • Put a TillReceipt with edges="both" in ReceiptPrinterPaper: its top teeth stay in the slot until a tear.
  • Set autoPrint={false} when a press must start the print, as on a register.
  • Add ReceiptPrinterTearTrigger so a keyboard can tear the paper off.
  • For a receipt that shows at once, with no printer, use a Till Receipt.
  • For a plain order summary in a page, use a Card.
TabMoves the focus to Print and to Tear off.
EnterorSpaceOn Print: prints the paper, or fades the old copy and prints again. On Tear off: tears the printed paper off.

The receipt is in the page from the start, so a screen reader reads it while it prints.

Tear off is the keyboard path of the pull. Both buttons stay in the tab order while they wait.

Feed
progress · the paper leaves the slot in 18px steps, 10 to 14 a second, with a 0.6px head jitter
Settle
progress · the strip swings once on the slot, 1.2° at first, and rests in about 0.9 s
Tear
sheetRelease · a short pull springs back; a long pull drops the copy 24px with a 2° lean
Print again
fade · the torn copy fades out before the next print

Built with

Installs with Receipt Printer

Components
Button
  1. AddedReceipt Printer, with Button.
Open the release