useXDSTablePagination@xds/core · Table

Usage

Table displays structured data in rows and columns with consistent dimensionality. It supports rich cell content, sorting, selection, pagination, and column management through a composable plugin system. Use Table for data sets with uniform structure; for simpler or inconsistent data, consider a list or card layout instead.

Best practices

GuidancePractices
DoUse density and divider variants to match the information density and scanning needs of your data.
DoCompose rich cell content with XDS components like XDSBadge, XDSStatusDot, and XDSAvatar via renderCell.
Don'tUse a table for data without consistent columns — use a list or card layout for heterogeneous content.
Don'tEnable every plugin at once — add only the features your use case requires to keep the interface focused.

Anatomy

ElementDescription
Column HeaderrequiredDisplays titles, sorting controls, and bulk selection.
Body RowsrequiredRows with consistent data structure.
FooterDisplays summary or totals.
Top BarContains title, toolbar, and filters.
Bottom BarContains pagination controls.
Support PanelsDisplays row details in a side panel.

Import

ts
import {useXDSTablePagination} from '@xds/core/Table'

Props

PropTypeDescription
pagerequired
numberCurrent page number (1-based).
onPageChangerequired
(page: number) => voidCalled when the page changes.
totalItems
numberTotal number of items across all pages. Used to calculate total page count.
totalPages
numberTotal number of pages. Use when you know the page count but not item count.
hasMore
booleanWhether more pages exist. Use for cursor-based pagination where the total is unknown.
pageSize
number (default: 10)Number of items per page.
onPageSizeChange
(pageSize: number) => voidCalled when the user changes the page size. Shows a page size dropdown when provided with pageSizeOptions.
pageSizeOptions
number[]Available page size options. Shows a page size selector when provided.
variant
'pages' | 'count' | 'compact' | 'dots' | 'none' (default: 'pages')Visual variant for the pagination controls.
position
'below' | 'above' | 'both' | 'none' (default: 'below')Where to render pagination controls relative to the table.
align
'start' | 'center' | 'end' (default: 'center')Horizontal alignment of the pagination controls.