opensourceui
GitHubTwitter/X
  1. Home
  2. Components
  3. Others
  4. Thermal Receipt
Back to Others

Components / Others

Thermal Receipt

Free Others React component — ThermalReceiptCard. MIT licensed, copy-paste ready for Next.js and Tailwind CSS.

Monospace receipt with line items, tax, total, perforated edges, and a QR footer. Reads like paper from a real register.

Preview

APPUI COMPONENTS

Park Street, Kolkata 700016

#AUI-2847 · 06 JUN 2026 · 14:32

AppUI Pro (Monthly)₹999
Component Pack₹499
Priority Support₹299
Subtotal₹1,797
GST 18%₹323
TOTAL₹2,120

Thank you for building with AppUI

Setup

How to use

Free for personal and commercial use. No UI attribution required. Include the MIT copyright notice when copying component source into your project. Read the MIT license.

  1. 1

    Run in your terminal:

    $npm install clsx tailwind-merge lucide-react
  2. 2

    Copy lib/cn.ts below. Skip if you already have cn().

  3. 3

    Copy the code below and create components/others/thermal-receipt-card.tsx in your project.

  4. 4

    Import and render:

    Example

    import { ThermalReceiptCard } from "@/components/others/thermal-receipt-card";

    <ThermalReceiptCard />

lib/cn.ts

1
2
3
4
5
6
import { type ClassValue, clsx } from "clsx";
import { twMerge } from "tailwind-merge";
 
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}

components/others/thermal-receipt-card.tsx

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
import { forwardRef, type ComponentPropsWithoutRef } from "react";
 
import { cn } from "@/lib/cn";
import { QrCode } from "lucide-react";
 
export type ThermalReceiptItem = Readonly<{
name: string;
price: string;
}>;
 
export type ThermalReceiptCardProps = Readonly<
{
storeName?: string;
storeAddress?: string;
orderId?: string;
date?: string;
items?: ThermalReceiptItem[];
subtotal?: string;
tax?: string;
total?: string;
footer?: string;
} & ComponentPropsWithoutRef<"div">
>;
 
const defaultItems: readonly ThermalReceiptItem[] = [
{ name: "AppUI Pro (Monthly)", price: "₹999" },
{ name: "Component Pack", price: "₹499" },
{ name: "Priority Support", price: "₹299" },
];
 
// Production-ready Thermal Receipt component — styled with Tailwind CSS.
export const ThermalReceiptCard = forwardRef<
HTMLDivElement,
ThermalReceiptCardProps
>(
(
{
className,
storeName = "APPUI COMPONENTS",
storeAddress = "Park Street, Kolkata 700016",
orderId = "#AUI-2847",
date = "06 JUN 2026 · 14:32",
items = defaultItems,
subtotal = "₹1,797",
tax = "₹323",
total = "₹2,120",
footer = "Thank you for building with AppUI",
...props
},
ref,
) => (
<div
ref={ref}
data-slot="thermal-receipt-card"
className={cn("w-55 font-mono sm:max-w-50", className)}
{...props}
>
<div className="relative bg-[#faf8f2] px-4 py-5 text-neutral-800 shadow-md">
<div
className="pointer-events-none absolute -top-2 right-0 left-0 h-2"
style={{
background:
"radial-gradient(circle at 8px 0, transparent 6px, #faf8f2 6px)",
backgroundSize: "16px 8px",
}}
/>
 
<div data-slot="thermal-receipt-card-header" className="text-center">
<p className="text-[11px] font-bold tracking-[0.2em]">{storeName}</p>
<p className="mt-1 text-[8px] leading-snug text-neutral-500">
{storeAddress}
</p>
<p className="mt-2 text-[8px] text-neutral-400">
{orderId} · {date}
</p>
</div>
 
<div
data-slot="thermal-receipt-card-divider"
className="my-3 border-t border-dashed border-neutral-300"
/>
 
<div data-slot="thermal-receipt-card-items" className="space-y-1.5">
{items.map((item) => (
<div
key={item.name}
className="flex justify-between gap-2 text-[9px]"
>
<span className="min-w-0 truncate">{item.name}</span>
<span className="shrink-0">{item.price}</span>
</div>
))}
</div>
 
<div className="my-3 border-t border-dashed border-neutral-300" />
 
<div className="space-y-0.5 text-[9px]">
<div className="flex justify-between text-neutral-500">
<span>Subtotal</span>
<span>{subtotal}</span>
</div>
<div className="flex justify-between text-neutral-500">
<span>GST 18%</span>
<span>{tax}</span>
</div>
<div className="flex justify-between pt-1 text-[11px] font-bold">
<span>TOTAL</span>
<span>{total}</span>
</div>
</div>
 
<div className="mt-4 flex flex-col items-center gap-2">
<QrCode size={36} className="text-neutral-700" aria-hidden />
<p className="text-center text-[7px] leading-snug text-neutral-400">
{footer}
</p>
</div>
 
<div
className="pointer-events-none absolute right-0 -bottom-2 left-0 h-2"
style={{
background:
"radial-gradient(circle at 8px 8px, transparent 6px, #faf8f2 6px)",
backgroundSize: "16px 8px",
}}
/>
</div>
</div>
),
);
 
ThermalReceiptCard.displayName = "ThermalReceiptCard";
PreviousNext

On this

page

Jump to a section on this page.

  • lib/cn.ts
  • components/others/thermal-receipt-card.tsx

Sponsor spot · demo preview

Logo

Your brand name

Your tagline or category

A short pitch about your product or service goes here. This is a preview of how sponsor cards will look in this sidebar.

Your call to action

This slot is available. Sponsor Opensource UI and reach developers browsing components every day.