nook
Browse the docs

Components

Invoice

Native

A printable invoice with responsive line items and a complete payment breakdown.

See the prompt

Invoice

INV-2026-042

Due

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
Line items for invoice INV-2026-042
DescriptionQtyUnit priceAmount
Brand identity · strategy and visual system1$2,400.00$2,400.00
Coffee packaging · three roast labels3$350.00$1,050.00
Production handoff and print review4$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

Thank you for making room for good design. Please pay within 14 days; email us if you need a different schedule.

Installation

npx nook-ui@latest add invoice

Prompt

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.

Plain text
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

Paid

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
Line items for invoice INV-2026-039
DescriptionQtyUnit priceAmount
Brand refresh, phase 21$4,200.00$4,200.00
Menu design, 6 pages6$150.00$900.00
Subtotal
$5,100.00
Tax
$0.00
Total
$5,100.00

Notes

Paid by bank transfer on October 12. Thank you.

Overdue, in euro

Invoice

INV-2026-031

Overdue

From

Linde Beratung GmbH

Bill to

Harbor Logistics

Issued
September 1, 2026
Payment due
September 15, 2026
Line items for invoice INV-2026-031
DescriptionQtyUnit priceAmount
Process review workshop (2 days)21.800,00 €3.600,00 €
Travel costs1240,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

Due

From

Northline Studio

Bill to

Fieldwork Coffee Co.

Issued
November 16, 2026
Payment due
December 16, 2026
Line items for invoice INV-2026-058
DescriptionQtyUnit priceAmount
Discovery workshop2$450.00$900.00
Wireframes1$570.00$570.00
Visual design1$690.00$690.00
Design system2$810.00$1,620.00
Front-end build1$930.00$930.00
Accessibility audit1$1,050.00$1,050.00
Content migration2$1,170.00$2,340.00
QA and bug fixing1$1,290.00$1,290.00
Launch support1$1,410.00$1,410.00
Subtotal
$10,800.00
Tax
$640.00
Total
$11,440.00

Notes

Payment is due within 30 days. Thank you for your business.

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.

PropTypeDefaultDescription
number / issued / duestring–Invoice identifier and dates already formatted by the app.
from / toReactNode–Sender and recipient address blocks.
itemsInvoiceLineItem[]–id, description, quantity and unitPrice for each line. Prices use major currency units.
discount / taxnumber0Absolute amounts subtracted or added after the subtotal.
currency / localestring"USD" / "en-US"Currency formatting for all amounts.
notes / paymentDetailsReactNode–Payment reference, instructions and other document content.
...propsReact.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.