Components
invoice
A clean, presentational XLSX invoice with an issuer header, line items and a VAT breakdown by rate.
A purely presentational XLSX invoice: issuer/client header, a line-items table and totals with a VAT breakdown grouped by rate.
This is not Factur-X — it's a presentational invoice for the MVP. The Factur-X module (compliant PDF/A-3 + embedded XML) is on the roadmap.
import { invoice } from "@liasse/components";
import { render } from "@liasse/core";
import "@liasse/xlsx";
const doc = invoice({
number: "2026-0412",
date: "01/09/2026",
dueDate: "30/09/2026",
issuer: { name: "ACME SAS", details: ["SIREN 812 449 220", "12 rue des Lilas, Paris"] },
client: { name: "Globex SARL", details: ["VAT FR 40 123456789"] },
lines: [
{ designation: "Liasse Pro license", quantity: 5, unitPrice: 490 },
{ designation: "Render API — flat fee", quantity: 1, unitPrice: 900 },
{ designation: "Priority support", quantity: 1, unitPrice: 350 },
],
defaultVatRate: 0.2,
});
const bytes = await render(doc, { format: "xlsx" });Input
| Field | Type | Description |
|---|---|---|
number | string | Invoice number. |
date? dueDate? | string | Issue / due dates. |
issuer | InvoiceParty | { name, details?: string[] }. |
client? | InvoiceParty | Optional recipient. |
lines | InvoiceLine[] | { designation, quantity, unitPrice, vatRate? }. |
defaultVatRate? | number | Applied to lines without a vatRate. Default 0.20. |
The component computes line amounts (quantity × unitPrice), the =SUM total,
and a VAT breakdown grouped by rate (e.g. VAT 20%), then the grand total.