⚛️
React Components
Familiar React components (Document, Page, View, Text, Image) optimized for thermal printers.
Thermal Printing for
|
A modular TypeScript library suite for thermal printing with clean, standalone architecture.

import {
Document,
Page,
Text,
View,
convertToESCPOS,
} from "@thermal-print/react";
function Receipt() {
return (
<Document>
<Page>
<Text style={{ fontSize: 20, textAlign: "center", fontWeight: "bold" }}>
MY STORE
</Text>
<View style={{ flexDirection: "row", justifyContent: "space-between" }}>
<Text>Coffee</Text>
<Text>$3.50</Text>
</View>
</Page>
</Document>
);
}
// Convert to ESC/POS and print
const buffer = await convertToESCPOS(<Receipt />, { paperWidth: 48 });
await printer.write(buffer);