DataTable
Wires TanStack Table's row model to the Table parts, adding sorting and optional pagination. Use it for tabular data that needs behaviour rather than markup.
React
Ready
Figma
Import
import { DataTable } from "@kela-systems/ui-components";This page has no live example yet. Storybook shows DataTable in every state and theme.
Props
DataTable
| Name | Default | Description |
|---|---|---|
classNamestring | ||
columnsRequiredColumnDef<TData, TValue>[] | ||
dataRequiredTData[] | ||
paginatedboolean | false | Adds the previous/next footer and slices rows to pageSize. |
pageSizenumber | 10 | Rows per page. An options.initialState value is spread later and wins. |
emptyMessageReact.ReactNode | No results. | Accepts text or a composed <Empty> for a richer empty state. |
loadingboolean | false | Renders pageSize placeholder rows with one Skeleton per column. |
labelsPartial<DataTableLabels> | Overrides pagination copy while retaining English defaults. |
It also takes the props of @tanstack/react-table.