Rebar UI

1.0

opinion

Table

Plain rows with a total.

InvoicesStatic rows, header, total
October invoices
InvoiceSupplierDateStatusAmount
INV-1041Quay Marine Supplies22 OctPaid£1,240.00
INV-1042Northern Print Co.23 OctDue£3,860.50
INV-1043Brightwater Studio24 OctOverdue£980.00
INV-1044Harbour Cafe Catering24 OctDraft£415.25

Total

£6,495.75

Selectable
Invoice
INV-1041
INV-1042
Loading
InvoiceAmount
Empty
InvoiceStatus
No invoices this month
Long text
Supplier
Northern Depot Quay 3 resurfacing, signage and lighting works, phase two

In context

InvoicesDesktop and phone
October invoices
InvoiceSupplierDateStatusAmount
INV-1041Quay Marine Supplies22 OctPaid£1,240.00
INV-1042Northern Print Co.23 OctDue£3,860.50
INV-1043Brightwater Studio24 OctOverdue£980.00

Total

£6,495.75

Invoices

INV-1041Quay Marine Supplies · 22 Oct
Paid

£1,240.00

INV-1042Northern Print Co. · 23 Oct
Due

£3,860.50

INV-1043Brightwater Studio · 24 Oct
Overdue

£980.00

Props

PropTypeRequiredDefault
columnsTableColumn<T>[]Yes—
dataT[]Yes—
rowKeystring | ((row: T) => string)Yes—
sortTableSort | null | undefinedNo—
onSortChange((sort: TableSort | null) => void) | undefinedNo—
selectedRowKeysstring[] | undefinedNo—
onSelectedRowKeysChange((keys: string[]) => void) | undefinedNo—
pageSizenumber | undefinedNo—
pagenumber | undefinedNo—
onPageChange((page: number) => void) | undefinedNo—
loadingboolean | undefinedNofalse
loadingDelayMsnumber | undefinedNo—
loadingMinDurationMsnumber | undefinedNo—
emptyMessageReactNodeNoNo data.
maxHeightnumber | undefinedNo—
captionReactNodeNo—
aria-labelstring | undefinedNo—
classNamestring | undefinedNo—
bionicboolean | undefinedNo—
bionicOptionsBionicOptions | undefinedNo—

Accessibility

A real <table> with a visible caption, <th> headers and, for sortable columns, buttons that announce their direction. Row selection is a column of real checkboxes with a header checkbox; loading rows are Skeletons marked aria-hidden, and the empty state is a real Empty.

data-rebar-* attributes

data-rebar-component="table" on the wrapper; data-rebar-part="caption" | "scroll", and each row carries aria-selected when selection is on.

Migrating to Ant Design

@rebar-ui/migrate-antd maps columns to AntD's columns (header to title, key to dataIndex, render kept) and data/rowKey to dataSource/rowKey. Selection becomes rowSelection, pagination pagination={{ pageSize }}.