Skip to Content
Kokonut UI

CD-12Cards

Receipt Printer

A receipt that prints line by line, then tears off and falls when you pull it, built with React.

Install with
no extra packages

PROShipping orders? Order Tracker is in Kokonut UI Pro

Installation

Receipt Printer is a free, open-source React component in the Kokonut UI Cards collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/receipt-printer.tsx, so the code is yours to change.

npx shadcn@latest add @kokonutui/receipt-printer

Usage

import ReceiptPrinter from "@/components/kokonutui/receipt-printer";

export default function Example() {
  return <ReceiptPrinter />;
}

Props

merchant
stringDefault "Kokonut Coffee"
order
stringDefault "#4182"
date
stringDefault "14 Oct 2026 · 08:42"
items
ReceiptItem[]Default built-in
tax
numberDefault 0.08

Tax rate, 0.08 for 8%.

currency
stringDefault "$"
autoPrint
booleanDefault true

Print as soon as the printer scrolls into view.

onPrint
() => void
onTear
() => void
className
string

Extra classes for the root element.

ReceiptItem

namerequired
string
quantityrequired
number
pricerequired
number

Dependencies

NeedsVersionComes from
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.