Toggle Sidebar B
header.lightDarkMode D

Table Data

Batteries-included data table built on TanStack Table. Pass columns, data, and a paginator meta object; you get search, sort, filter, pagination, row selection, bulk actions, and column visibility out of the box. For static tables, use the primitive Table.

When to use TableData vs Table

Table is for static, read-only displays of small data. TableData is the full feature set when users need to search, sort, filter, paginate, or bulk-act on rows.

Default

Five rows with TanStack column definitions and a Laravel-style paginator meta.

Add
Invoice
Customer
Status
Amount
INV-001Olivia MartinPaid$250.00
INV-002Jackson LeePending$150.00
INV-003Isabella NguyenUnpaid$350.00
INV-004Sofia DavisPaid$450.00
INV-005Liam BrownPaid$120.00
Showing 1 to 5 of 5 results.

API Reference

Props, events, and slots for each sub-component.

TableData

Props

PropTypeDefaultDescription
columnsColumnDef[]TanStack Table column definitions. Use accessorKey for data fields and id for custom columns like select / actions. header and cell accept strings or render functions.
dataRow[]Row data array.
metaPaginatorMetaLaravel-style paginator metadata: { current_page, per_page, total, last_page, from, to }.
modelstringResource slug used for query-string keys and add-button label.
labelstringSingular label shown in the add button and empty state.
pendingbooleanfalseShow skeleton rows while data loads.
errorError | string | nullnullRender an error block above the table.
searchablebooleantrueShow the search input.
columnTogglebooleantrueShow the column visibility menu.
initialSortingSortingState[{ id: 'created_at', desc: true }]Initial sort. Override when your data has no created_at column.
initialPaginationPaginationState{ pageIndex: 0, pageSize: 10 }Initial page index and size.

Events

EventDescription
refreshFired when the user clicks the refresh button.
update:paginationFired when the page index or size changes.
update:sortingFired when sort state changes.
update:columnFiltersFired when column filters change.
update:rowSelectionFired when row selection changes.

Slots

SlotDescription
filtersSlot for custom filter UI. Receives { table }.
add-buttonSlot for a custom add button in the toolbar.
actionsToolbar actions on the right.
bulk-actionsToolbar shown when rows are selected.