Skip to content

DataTable

Sort dates and amounts, reconcile subtotals and print an accounting ledger.

alpina-ui/ui/data-table

Interactive preview

Print ledger
WorkBookedAmount (CHF)
Prepress
Cover proofs480.00
Plate creditminus 32.50
Prepress subtotal447.50
Printing
Press run1’280.50
Binding96.00
Printing subtotal1’376.50
Invoice total1’824.00

Usage notes

An invoice link labelled 2026-0141 stays on one line automatically. Set nowrap: true on the column for a custom link containing nested markup, or nowrap: false to allow wrapping. Use typed CHF, decimal and Swiss date columns to sort records. Use aggregate="sum", groupBy and totalLabel for totals and subtotals.

When to use

Let readers reorder comparable records, such as invoices by due date or amount.

When to avoid

A fixed tariff schedule with a prescribed reading order only needs Table.

Accessibility

Use the sort button inside the header, expose its direction and translate the sort hint. Compare dates and amounts by their underlying values.

Keys
KeyAction
Tab / Shift+TabMove to sortable column headings and other controls.
Enter / SpaceSort by the focused column. Activate again to reverse the order.
← / →Scroll wide content while its scroll region has focus.

Content

Use the field name as the header, with the unit when needed. Put the sorting instruction in the hint instead of repeating it in every heading.

Use
Due date
Avoid
Click here to sort this column

Copy in four languages

German
Fälligkeit10 characters
French
Échéance8 characters
Italian
Scadenza8 characters
Romansh
Scadenza8 characters
Add to your project
npx --no-install alpina add data-table