Componentdata0.76 KB gzipZero dependencies
Receipt
Thermal receipt with zigzag tear edge, mono lines and barcode footer.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add receiptOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { Receipt } from "@/components/ui/receipt"; <Receipt />Source code
receipt.tsx + 1 helperZero 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 />| Prop | Type | Description |
|---|---|---|
| items | { label: string; price: string }[] | Structured list of items rendered by the component. (Default: []) |
| taxRate | number | Configures tax rate. (Default: 0.1) |
| total | string | Configures total. (Default: "") |
| className | string | Optional Tailwind or custom CSS classes merged with component styles. |