Components/Receipt

Receipt

Printer-style receipt - monospaced, with store header, items table, totals, and free-form footer. Ready for both thermal (80mm) and A4 layouts.


Padaria do Bairro

Rua dos Pães, 123 - São Paulo

CNPJ: 12.345.678/0001-90

24/05/2026, 10:30

ItemQtdTotal

Pão francês

R$ 0,75 cada

6R$ 4,50

Café espresso

R$ 6,50 cada

2R$ 13,00

Pão de queijo

R$ 4,00 cada

4R$ 16,00
SubtotalR$ 32,50
DescontoR$ 2,50
ImpostoR$ 1,50
TOTALR$ 31,50
PagamentoPix

Obrigado pela preferência! NF-e: 000.123.456

Installation

npx @ajax-ui/cli add receipt

Props

  • storeName · storeAddress · storeTaxId - header content.
  • items - { name, qty, unitPrice }[].
  • subtotal · discount · tax · total - totals shown verbatim.
  • paymentMethod · footer - optional below totals.
  • variant "thermal" | "a4" - switches max-width and padding.
  • issuedAt - defaults to new Date().

Printing

Wrap in a print stylesheet (@media print) and use variant="thermal" for ESC/POS printers, variant="a4" for letter-sized layouts.