Components
Invoice
NativeA printable invoice with responsive line items and a complete payment breakdown.
Invoice
INV-2026-042
From
Northline Studio
18 Orchard Street
Brooklyn, NY 11201
hello@northline.example
Bill to
Fieldwork Coffee Co.
Attn: Maya Chen
204 Atlantic Avenue
Brooklyn, NY 11201
- Issued
- November 14, 2026
- Payment due
- November 28, 2026
| Description | Qty | Unit price | Amount |
|---|---|---|---|
| Brand identity · strategy and visual system | 1 | $2,400.00 | $2,400.00 |
| Coffee packaging · three roast labels | 3 | $350.00 | $1,050.00 |
| Production handoff and print review | 4 | $125.00 | $500.00 |
- Subtotal
- $3,950.00
- Discount
- -$200.00
- Tax
- $300.00
- Total
- $4,050.00
Payment details
Bank transfer · Northline Studio LLC
Account ending 2048 · Routing ending 0015
Use INV-2026-042 as your payment reference.
Notes
Installation
npx nook-ui@latest add invoicePrompt
Paste this into your AI coding assistant. It adds this exact component, the same way the CLI does, and tells the assistant how to use it.
Short. For assistants that can run commands in your project.
Add the Nook "Invoice" component to this project, exactly as Nook ships it.
A printable invoice with responsive line items and a complete payment breakdown.
Steps
1. Check for `nook.json` in the project root. If it is missing, run `npx nook-ui@latest init` first (React or Next.js with Tailwind CSS v4). It adds the Nook tokens, the theme and `cn()`.
2. Run `npx nook-ui@latest add invoice`. It writes `components/ui/invoice.tsx` together with everything the component needs. Do not write the component from memory.
3. If you cannot run commands, fetch http://localhost:3000/r/invoice.json, write every entry of `files` to the path it names, install the packages in `dependencies`, and repeat for each name in `registryDependencies`.
4. Use it where I ask. Start from this example:
```tsx
import { Invoice } from "@/components/ui/invoice";
export default function InvoiceDefault() {
return (
<Invoice
className="max-w-3xl"
number="INV-2026-042"
status="due"
issued="November 14, 2026"
due="November 28, 2026"
from={
<>
<p className="font-semibold">Northline Studio</p>
<p>
18 Orchard Street
<br />
Brooklyn, NY 11201
</p>
<p>hello@northline.example</p>
</>
}
to={
<>
<p className="font-semibold">Fieldwork Coffee Co.</p>
<p>
Attn: Maya Chen
<br />
204 Atlantic Avenue
<br />
Brooklyn, NY 11201
</p>
</>
}
items={[
{
id: "identity",
description: "Brand identity · strategy and visual system",
quantity: 1,
unitPrice: 2400,
},
{
id: "packaging",
description: "Coffee packaging · three roast labels",
quantity: 3,
unitPrice: 350,
},
{
id: "handoff",
description: "Production handoff and print review",
quantity: 4,
unitPrice: 125,
},
]}
discount={200}
tax={300}
paymentDetails={
<p>
Bank transfer · Northline Studio LLC
<br />
Account ending 2048 · Routing ending 0015
<br />
Use INV-2026-042 as your payment reference.
</p>
}
notes="Thank you for making room for good design. Please pay within 14 days; email us if you need a different schedule."
/>
);
}
```
API
- `Invoice`: A document; totals are derived from the supplied line items and absolute discount and tax amounts.
- `number / issued / due` (`string`): Invoice identifier and dates already formatted by the app.
- `from / to` (`ReactNode`): Sender and recipient address blocks.
- `items` (`InvoiceLineItem[]`): id, description, quantity and unitPrice for each line. Prices use major currency units.
- `discount / tax` (`number`, default 0): Absolute amounts subtracted or added after the subtotal.
- `currency / locale` (`string`, default "USD" / "en-US"): Currency formatting for all amounts.
- `notes / paymentDetails` (`ReactNode`): Payment reference, instructions and other document content.
- `...props` (`React.HTMLAttributes<HTMLElement>`): Everything the native element accepts, such as `id`, `aria-*` and event handlers.
- Variant `status`: paid, due, overdue (default due)
Rules
- Colors, radii, shadows and motion come from Nook tokens and classes such as `bg-primary`, `text-muted-foreground`, `border-border`, `rounded-lg` and `h-control`. Never hard-code them.
- Do not restyle or simplify the file. Change how it looks through `className`, its props and the theme.
- It must keep working with the keyboard, in light and dark mode, and in the sharp, soft and bold styles.
- Accessibility: The line items remain a semantic table, including when stacked on small screens. Status is stated in words. Print utilities remove borders and elevation and keep sections together.
Done when the component renders like the example in light and dark mode and the project type-checks.Usage
import { Invoice } from "@/components/ui/invoice";
export default function InvoiceDefault() {
return (
<Invoice
className="max-w-3xl"
number="INV-2026-042"
status="due"
issued="November 14, 2026"
due="November 28, 2026"
from={
<>
<p className="font-semibold">Northline Studio</p>
<p>
18 Orchard Street
<br />
Brooklyn, NY 11201
</p>
<p>hello@northline.example</p>
</>
}
to={
<>
<p className="font-semibold">Fieldwork Coffee Co.</p>
<p>
Attn: Maya Chen
<br />
204 Atlantic Avenue
<br />
Brooklyn, NY 11201
</p>
</>
}
items={[
{
id: "identity",
description: "Brand identity · strategy and visual system",
quantity: 1,
unitPrice: 2400,
},
{
id: "packaging",
description: "Coffee packaging · three roast labels",
quantity: 3,
unitPrice: 350,
},
{
id: "handoff",
description: "Production handoff and print review",
quantity: 4,
unitPrice: 125,
},
]}
discount={200}
tax={300}
paymentDetails={
<p>
Bank transfer · Northline Studio LLC
<br />
Account ending 2048 · Routing ending 0015
<br />
Use INV-2026-042 as your payment reference.
</p>
}
notes="Thank you for making room for good design. Please pay within 14 days; email us if you need a different schedule."
/>
);
}Examples
Paid invoice
Invoice
INV-2026-039
From
Northline Studio
18 Orchard Street, Brooklyn
Bill to
Fieldwork Coffee Co.
204 Atlantic Avenue, Brooklyn
- Issued
- October 3, 2026
- Payment due
- October 17, 2026
| Description | Qty | Unit price | Amount |
|---|---|---|---|
| Brand refresh, phase 2 | 1 | $4,200.00 | $4,200.00 |
| Menu design, 6 pages | 6 | $150.00 | $900.00 |
- Subtotal
- $5,100.00
- Tax
- $0.00
- Total
- $5,100.00
Notes
Overdue, in euro
Invoice
INV-2026-031
From
Linde Beratung GmbH
Bill to
Harbor Logistics
- Issued
- September 1, 2026
- Payment due
- September 15, 2026
| Description | Qty | Unit price | Amount |
|---|---|---|---|
| Process review workshop (2 days) | 2 | 1.800,00 € | 3.600,00 € |
| Travel costs | 1 | 240,00 € | 240,00 € |
- Subtotal
- 3.840,00 €
- Discount
- -150,00 €
- Tax
- 0,19 €
- Total
- 3.690,19 €
Payment details
IBAN DE00 0000 0000 0000 0000 00. Please use the invoice number as the reference.
Many line items
Invoice
INV-2026-058
From
Northline Studio
Bill to
Fieldwork Coffee Co.
- Issued
- November 16, 2026
- Payment due
- December 16, 2026
| Description | Qty | Unit price | Amount |
|---|---|---|---|
| Discovery workshop | 2 | $450.00 | $900.00 |
| Wireframes | 1 | $570.00 | $570.00 |
| Visual design | 1 | $690.00 | $690.00 |
| Design system | 2 | $810.00 | $1,620.00 |
| Front-end build | 1 | $930.00 | $930.00 |
| Accessibility audit | 1 | $1,050.00 | $1,050.00 |
| Content migration | 2 | $1,170.00 | $2,340.00 |
| QA and bug fixing | 1 | $1,290.00 | $1,290.00 |
| Launch support | 1 | $1,410.00 | $1,410.00 |
- Subtotal
- $10,800.00
- Tax
- $640.00
- Total
- $11,440.00
Notes
Variants
Defined in one place with cva, at the top of the component file.
status
paiddue (default)overdue
Props
Invoice
A document; totals are derived from the supplied line items and absolute discount and tax amounts.
| Prop | Type | Default | Description |
|---|---|---|---|
| number / issued / due | string | – | Invoice identifier and dates already formatted by the app. |
| from / to | ReactNode | – | Sender and recipient address blocks. |
| items | InvoiceLineItem[] | – | id, description, quantity and unitPrice for each line. Prices use major currency units. |
| discount / tax | number | 0 | Absolute amounts subtracted or added after the subtotal. |
| currency / locale | string | "USD" / "en-US" | Currency formatting for all amounts. |
| notes / paymentDetails | ReactNode | – | Payment reference, instructions and other document content. |
| ...props | React.HTMLAttributes<HTMLElement> | – | Everything the native element accepts, such as `id`, `aria-*` and event handlers. |
Accessibility
The line items remain a semantic table, including when stacked on small screens. Status is stated in words. Print utilities remove borders and elevation and keep sections together.
Checked against WCAG 2.1 AA with automated axe tests and keyboard tests on every release.