Componentdata0.76 KB gzipZero dependencies

Receipt

Thermal receipt with zigzag tear edge, mono lines and barcode footer.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add receipt

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { Receipt } from "@/components/ui/receipt"; <Receipt />

Source code

receipt.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxreceipt.tsx72 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface ReceiptProps extends React.HTMLAttributes<HTMLElement> {  items: { label: string; price: string }[];  taxRate?: number;  total: string;  className?: string;} function parseAmount(raw: string): number {  const n = parseFloat(raw.replace(/[^0-9.-]/g, ""));  return Number.isFinite(n) ? n : 0;} export function Receipt({

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { Receipt } from "@/components/ui/receipt"; <Receipt />
PropTypeDescription
items{ label: string; price: string }[]Structured list of items rendered by the component. (Default: [])
taxRatenumberConfigures tax rate. (Default: 0.1)
totalstringConfigures total. (Default: "")
classNamestringOptional Tailwind or custom CSS classes merged with component styles.