Invoice

Printable invoice with number and UTC-formatted dates, an animated Paid / Due / Overdue status badge, bill-from and bill-to, a staggered line-item table and subtotal, tax and total, plus Download, Send and Mark-as-paid actions that stamp the sheet and roll the amount due to zero, with print variants that hide the actions and switch to ink-friendly colors.

Preview

Invoice preview width

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @karaui/invoice
@karaui not found? Add it to components.json
{
  "registries": {
    "@karaui": "https://karaui.kamisama-v0.my.id/r/{name}.json"
  }
}

@karaui is in shadcn's public registry directory, so the latest CLI needs no setup. On an older CLI, merge this into the existing file once and every @karaui/… install resolves.

API Reference

number
string
—
issueDate
string

ISO date (YYYY-MM-DD), formatted in UTC so server and client agree.

—
dueDate
string
—
from
InvoiceParty
—
to
InvoiceParty
—
items
InvoiceLineItem[]
—
taxRate?
number

0.1 = 10%. Default 0.

0
currency?
string
USD
locale?
string
en-US
notes?
ReactNode
—
logo?
ReactNode

Brand mark shown beside the title.

—
status?
"paid" | "due" | "overdue"
—
defaultStatus?
"paid" | "due" | "overdue"
due
onStatusChange?
((status: InvoiceStatus) => void)
—
onDownload?
(() => void)

Defaults to `window.print()` — the layout carries `print:` styles.

—
onSend?
(() => void | Promise<void>)

Return a promise to drive the Send button's pending/sent/error states.

—
onMarkPaid?
(() => void | Promise<void>)

Resolve to flip the status to Paid (stamp + amount due rolls to zero).

—
className?
string
—

Keep in mind

Some components on this site are inspired by or recreated from existing work across the web. I'm not here to take credit; just to learn, experiment, and sometimes push things a bit further. If something looks familiar and I forgot to mention you, reach out and I'll fix that right away.

Updated