Skip to Content
glob.ui home
Components

Data table

A table with sorting, search, pagination, row selection and column visibility, each opt-in. Built on TanStack Table v9.

Client componentUses state or handlers, so it starts with "use client".
import { DataTable, createDataTableColumnHelper, dataTableFeatures } from "@glob-ui/data-table"

Preview

Ana A.DesignAdmin2019
Benito B.PlatformEditor2020
Canción C.GrowthViewer2021
Dara D.SupportAdmin2022
Eli E.DesignEditor2023
Fátima F.PlatformViewer2024
Gus G.GrowthAdmin2025
Hana H.SupportEditor2019
Ivo I.DesignViewer2020
Jun J.PlatformAdmin2021
Page 1 of 4
Rows per page
10
20
50
Page 1 of 4

Examples

Row selection and a toolbar

rowSelection adds a checkbox column with select-all (indeterminate when some rows are selected). toolbar puts bulk actions next to the search.

InvoiceClientAmount
INV-1000Atlas Studio$300
INV-1001Northwind$425
INV-1002Bluebird Labs$550
INV-1003Atlas Studio$675
INV-1004Northwind$800
Page 1 of 3
0 of 12 rows selected
Rows per page
10
20
50
Page 1 of 3

Server data

manual with state, the change handlers and rowCount: the server sorts and pages, and loading shows skeleton rows.

Rows per page
10
20
50
Page 1 of 1

Columns and row actions

columnVisibility adds a Columns menu. A helper.display column can hold row actions.

Actions
WebsiteAnaLive2026-10-02
Mobile appBenitoReview2026-10-14
DocsDaraDraft2026-11-01
BillingEliLive2026-09-21

Client-side vs server-side

By default the table sorts, filters and pages the rows it has. That is right for up to a few thousand rows that arrive once.

For larger data, set manual. The server then does the sorting and paging: pass the current state and the change handlers (onSortingChange, onPaginationChange, onGlobalFilterChange), and the total as rowCount. The table shows data exactly as it is given, so the server's order is kept. The "Server data" example shows the full loop with a fake 400 ms request.

API

Props are generated from the TypeScript types in the package source.

DataTable

Prop

Type

DataTableState

Prop

Type

Accessibility

Key or actionBehaviour
SortThe column header is a button. aria-sort on the header says ascending, descending or none. Shift adds a second sort.
SearchA search field named "Search". After a search the live region says the result count, for example "12 results".
PagesThe live region announces the page, for example "Page 2 of 5".
Select"Select all rows" selects the page and is indeterminate when some rows are selected. Each row has "Select row".
RowsA row click (onRowClick) is for pointers only: give keyboard users a link or button inside a cell.

ARIA. The table is named by aria-label and is a scroll region when it can be wider than its container. aria-busy is set while loading.

On this page