Skip to content
VenusUI
Get started

Receipt Printer

A receipt that prints out of a slot line by line, with itemized totals and a torn zig-zag edge.

Preview

Installation

npx shadcn@latest add @venusui/receipt-printer

Run this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.

Files added to your project

Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.

  • @/components/ui/receipt-printer.tsx

Usage

The code behind the preview above.

receipt-printer-demo.tsx

import { ReceiptPrinter } from "@/components/ui/receipt-printer"

// The café is made up.
export default function ReceiptPrinterDemo() {
  return (
    <ReceiptPrinter
      store="Little Fern Café"
      address="12 Harbour Street, Lisbon"
      date="16 Nov 2026, 09:41"
      orderId="#0482"
      currency="EUR"
      locale="en-IE"
      taxRate={0.13}
      paidWith="Visa •• 4821"
      items={[
        { name: "Flat white", quantity: 2, price: 3.4 },
        { name: "Pastel de nata", quantity: 3, price: 1.6 },
        { name: "Avocado toast", quantity: 1, price: 8.5 },
        { name: "Orange juice", quantity: 1, price: 3.9 },
      ]}
    />
  )
}

API reference

PropTypeDefaultDescription
store, addressstring—Printed at the top.
items{ name: string; quantity: number; price: number }[]—Line items; totals are calculated from them.
taxRatenumber0e.g. 0.2 for 20%, added on top.
currency, localestring"USD", "en-US"Formats prices with Intl.NumberFormat.
paidWith, orderId, datestring—Printed details.

All <div> props.

Requirements

  • lucide-react for the replay icon. React 19 and Tailwind CSS v4.

Customization

  • Printing speed scales with the number of lines; change 0.12 (seconds per line) in the paper's transition.

Accessibility

  • Items are a table and totals a description list, so they read in order.
  • With reduced motion it appears already printed.

Troubleshooting

Totals are off by a cent.
Prices are added as numbers; for money in production, calculate totals on your server in cents.
Unknown registry "@venusui"
Your shadcn CLI couldn’t find the namespace in the shadcn registry index. Use the latest CLI (npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.
No components.json found
Run npx shadcn@latest init in your project first.
Loading preview

Notification Stack

Data display

Phone-style stacked notifications with frosted glass that fan out into a list on hover or click.

Loading preview

Terminal

Data display

A terminal window that types commands and prints their output when it scrolls into view.

Loading preview

Weather Widget

Data display

A weather widget with a live sky: turning sun rays, drifting clouds, falling rain or snow, and twinkling stars.