A design studio’s invoice as one Server Component: sender and recipient addresses, the invoice number and dates, a status Badge, the services in a Table with quantity, rate and amount, totals aligned to the right, and payment instructions. Print and Download PDF are Buttons rendered as links.
Cedar Creek Watershed Council Attn: Dana Whitfield 88 River Road Tacoma, WA 98402
From
Northfold Studio LLC 412 Alder Street, Suite 3 Bellingham, WA 98225 billing@northfold.example
Invoice no.
INV-2026-0142
Issued
Due
Services for INV-2026-0142
Description
Qty
Rate
Amount
Discovery workshops Two on-site days with field staff
2 days
$1,800.00
$3,600.00
Interface design Offline note-taking and sync flows
46 hrs
$150.00
$6,900.00
Usability testing Eight sessions, recruiting included
8 sessions
$425.00
$3,400.00
Design system handoff Tokens, component specs and a walkthrough
1 package
$2,400.00
$2,400.00
Subtotal
$16,300.00
Sales tax (9%)
$1,467.00
Total due
$17,767.00
Payment
ACH or wire to Harbor Valley Credit Union, account ending 4821. Use INV-2026-0142 as the reference. Net 30; a 1.5% monthly fee applies after the due date.
Notes
Thank you, Dana. Phase 3 kicks off January 12; the statement of work follows by email this week.
Source · recipes/invoice.tsxrecipes/invoice.tsx
import {
Badge, BodySmall, Button, Grid, Heading, Separator, Stack, Table, TableBody, TableCell, TableContainer, TableHead, TableHeader, TableRow, Text,} from'@blocks/design-system'import { Download, Mountain, Printer } from'lucide-react'importtype { ReactNode } from'react'import styles from'./invoice.module.css'constlineItems= [
{ description:'Discovery workshops', detail:'Two on-site days with field staff', quantity:2, unit:'days', rate:1800 }, { description:'Interface design', detail:'Offline note-taking and sync flows', quantity:46, unit:'hrs', rate:150 }, { description:'Usability testing', detail:'Eight sessions, recruiting included', quantity:8, unit:'sessions', rate:425 }, { description:'Design system handoff', detail:'Tokens, component specs and a walkthrough', quantity:1, unit:'package', rate:2400 },]
consttaxRate=0.09constmoney=newIntl.NumberFormat('en-US', { style:'currency', currency:'USD' })
// A printable invoice, rendered entirely on the server. Totals are computed// from the line items; the module's print rules hide the actions and borders.exportdefaultfunctionInvoice() {
constsubtotal=lineItems.reduce((sum, item) => sum +item.quantity *item.rate,0)
consttax= subtotal * taxRate
consttotal= subtotal + tax
return (
<articlearia-labelledby="invoice-title"className={styles.sheet}>
<Stackgap="xl">
<Stackdirection="row"justify="space-between"align="start"gap="lg"wrap="wrap">
<Stackdirection="row"gap="md"align="center">
<spanclassName={styles.mark}>
<Mountainaria-hidden />
</span>
<Stackgap="none">
<TextfontWeight="semibold">Northfold Studio</Text>
<TextfontSize="sm"color="text-muted">
Product design for field teams
</Text>
</Stack>
</Stack>
<Stackdirection="row"gap="sm"dangerouslySetClassName={styles.actions}>
<Buttonas="a"href="#invoice-print"size="sm">
<Printeraria-hiddenclassName={styles.icon} />
Print
</Button>
<Buttonas="a"href="#invoice-pdf"size="sm"variant="primary">
<Downloadaria-hiddenclassName={styles.icon} />
Download PDF
</Button>
</Stack>
</Stack>
<Stackgap="sm">
<Stackdirection="row"gap="md"align="center"wrap="wrap">
<Headingas="h2"id="invoice-title"fontSize="xxl">
Invoice
</Heading>
<Badgetone="warning">Unpaid · due Dec 18</Badge>
</Stack>
<Textcolor="text-muted">Field app redesign, phase 2</Text>
</Stack>
<Gridgap="lg"dangerouslySetClassName={styles.parties}>
<Partytitle="Billed to">
<TextfontWeight="semibold">Cedar Creek Watershed Council</Text>
<br />
Attn: Dana Whitfield
<br />
88 River Road
<br />
Tacoma, WA 98402
</Party>
<Partytitle="From">
<TextfontWeight="semibold">Northfold Studio LLC</Text>
<br />
412 Alder Street, Suite 3
<br />
Bellingham, WA 98225
<br />
billing@northfold.example
</Party>
<dlclassName={styles.meta}>
<div>
<dt>Invoice no.</dt>
<dd>INV-2026-0142</dd>
</div>
<div>
<dt>Issued</dt>
<dd>
<timedateTime="2026-11-18">Nov 18, 2026</time>
</dd>
</div>
<div>
<dt>Due</dt>
<dd>
<timedateTime="2026-12-18">Dec 18, 2026</time>
</dd>
</div>
</dl>
</Grid>
<TableContainertabIndex={0} role="region"aria-labelledby="invoice-items-caption">
<TabledangerouslySetClassName={styles.table}>
<captionid="invoice-items-caption"className={styles.caption}>
Services for INV-2026-0142
</caption>
<TableHeader>
<TableRow>
<TableHeadscope="col">Description</TableHead>
<TableHeadscope="col"textAlign="right">
Qty
</TableHead>
<TableHeadscope="col"textAlign="right">
Rate
</TableHead>
<TableHeadscope="col"textAlign="right">
Amount
</TableHead>
</TableRow>
</TableHeader>
<TableBody>
{lineItems.map((item) => (
<TableRowkey={item.description}>
<TableCell>
<TextfontWeight="medium">{item.description}</Text>
<br />
<TextfontSize="xs"color="text-muted">
{item.detail}
</Text>
</TableCell>
<TableCelltextAlign="right">
{item.quantity} {item.unit}
</TableCell>
<TableCelltextAlign="right">{money.format(item.rate)}</TableCell>
<TableCelltextAlign="right">{money.format(item.quantity *item.rate)}</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</TableContainer>
<dlclassName={styles.totals} aria-label="Totals">
<div>
<dt>Subtotal</dt>
<dd>{money.format(subtotal)}</dd>
</div>
<div>
<dt>Sales tax ({taxRate *100}%)</dt>
<dd>{money.format(tax)}</dd>
</div>
<divclassName={styles.total}>
<dt>Total due</dt>
<dd>{money.format(total)}</dd>
</div>
</dl>
<Separator />
<Gridgap="lg"dangerouslySetClassName={styles.notes}>
<Stackas="section"gap="xs"aria-labelledby="invoice-payment">
<Headingas="h3"id="invoice-payment"fontSize="sm">
Payment
</Heading>
<BodySmallmargin="none"color="text-muted">
ACH or wire to Harbor Valley Credit Union, account ending 4821. Use <spanclassName={styles.nowrap}>INV-2026-0142</span> as the reference. Net 30; a 1.5%
monthly fee applies after the due date.
</BodySmall>
</Stack>
<Stackas="section"gap="xs"aria-labelledby="invoice-notes">
<Headingas="h3"id="invoice-notes"fontSize="sm">
Notes
</Heading>
<BodySmallmargin="none"color="text-muted">
Thank you, Dana. Phase 3 kicks off January 12; the statement of work follows by email this week.
</BodySmall>
</Stack>
</Grid>
</Stack>
</article>
)
}
functionParty({ title, children }: { title:string; children:ReactNode }) {
return (
<Stackgap="xs">
<TextfontSize="xs"fontWeight="semibold"color="text-muted">
{title}
</Text>
<pclassName={styles.address}>{children}</p>
</Stack>
)
}
Nothing here needs the client: the totals are computed from the line items while rendering, and the parts are imported by name (TableHead, TableCell), as a Server Component must.
Print and Download PDF link to routes the app serves, such as a print view and a generated PDF. The page prints well on its own too: the module’s @media print rules drop the buttons and the card’s border and shadow, and keep table rows and the totals from splitting across pages.
Every number uses tabular numerals and is right-aligned, so amounts line up by digit down the table and through the totals. When the sheet is under 30rem wide, a container query stacks each line: the description across the top, then quantity × rate on the left and the amount on the right, with the column headers kept for screen readers.
The invoice number and dates are a description list, with time elements carrying machine-readable dates.
Container queries put the parties in three columns from 34rem wide and stack them on a phone.