Skip to main content
Build a complete invoice document from scratch.

What we’re building

A professional invoice with:
  • Page header and footer with page numbers
  • Company info
  • Customer details
  • Line items table
  • Total calculation
  • Payment terms

Setup

Create invoice.tsx:

Document structure

Start with the basic shell:

Add repeating header and footer with page numbers:
These appear on every page of the section.

Company info

Add company info and invoice number:

Customer details

Add billing information:

Line items table

Add the products/services:

Total

Add subtotal, tax, and total:

Payment terms

Add terms at the bottom:

Complete code


Run it

Open invoice.docx in Word.

Next steps