Default
| Invoice | Customer | Date | Amount |
|---|---|---|---|
| INV-1042 | Northwind Ltd | 3 Oct 2026 | £1,240.50 |
| INV-1043 | Fabrikam | 7 Oct 2026 | £380.00 |
| INV-1044 | Contoso | 12 Oct 2026 | £9,120.75 |
| INV-1045 | Tailspin Toys | 19 Oct 2026 | £64.00 |
| Total | £10,805.25 | ||
Show the codeHide the code
Default, code
const invoices = [
{ id: 'INV-1042', customer: 'Northwind Ltd', date: '3 Oct 2026', amount: 1240.5 },
{ id: 'INV-1043', customer: 'Fabrikam', date: '7 Oct 2026', amount: 380 },
{ id: 'INV-1044', customer: 'Contoso', date: '12 Oct 2026', amount: 9120.75 },
{ id: 'INV-1045', customer: 'Tailspin Toys', date: '19 Oct 2026', amount: 64 },
];
const gbp = (n: number) => new Intl.NumberFormat('en-GB', { style: 'currency', currency: 'GBP' }).format(n);
<Table aria-label="Invoices">
<TableCaption>Invoices issued in October 2026</TableCaption>
<TableHeader>
<TableRow><TableHead>Invoice</TableHead><TableHead>Customer</TableHead><TableHead>Date</TableHead><TableHead align="end">Amount</TableHead></TableRow>
</TableHeader>
<TableBody>
{invoices.map((i) => (
<TableRow key={i.id}><TableRowHeader>{i.id}</TableRowHeader><TableCell>{i.customer}</TableCell><TableCell>{i.date}</TableCell><TableCell align="end">{gbp(i.amount)}</TableCell></TableRow>
))}
</TableBody>
<TableFooter>
<TableRow><TableRowHeader colSpan={3}>Total</TableRowHeader><TableCell align="end">{gbp(invoices.reduce((a, i) => a + i.amount, 0))}</TableCell></TableRow>
</TableFooter>
</Table>