Data Table

Filterable, sortable data table with search, status filters, and pagination.

Preview

Features

  • Generic TypeScript support with custom column definitions
  • Filter chips with search input and status popover (Vercel style)
  • Clickable column headers for sorting (asc/desc)
  • Simple pagination with Previous/Next buttons
  • Custom cell rendering via render function
  • Loading skeleton state
  • Empty state with icon
  • Optional row click handler

Install Summary

This kit will add the following files and dependencies to your project. Download the bundle and extract it into your project root.

Component Files

FilePath
data-table.tsxcomponents/data/data-table/data-table.tsx
data-table-filters.tsxcomponents/data/data-table/data-table-filters.tsx
data-table-pagination.tsxcomponents/data/data-table/data-table-pagination.tsx
data-table-empty.tsxcomponents/data/data-table/data-table-empty.tsx
types.tscomponents/data/data-table/types.ts
index.tscomponents/data/data-table/index.ts

Utility Files

FilePath
design-tokens.tslib/design-tokens.ts

Dependencies

Install these dependencies before using the component:

Installation

Download the complete bundle as a ZIP file, or copy the text bundle to your clipboard:

Code available with Pro

Unlock this component to download or copy the install files.

One-time $99. Updates included.

Component Files

The component consists of the following files:

1. data-table.tsx

2. data-table-filters.tsx

3. data-table-pagination.tsx

4. data-table-empty.tsx

5. types.ts

6. index.ts

Shared Utilities

This component uses shared utility functions. These are included in the bundle above:

design-tokens.ts

Usage

DataTable Props

PropTypeDefault
dataT[]required
columnsColumn<T>[]required
filterKeykeyof T-
statusKeykeyof T-
statusOptionsStatusOption[]-
pageSizenumber10
loadingbooleanfalse
emptyMessagestring"No results found"
onRowClick(row: T) => void-

Column Configuration

PropertyTypeDescription
keykeyof TProperty key to access from data row
labelstringColumn header text
sortablebooleanEnable sorting for this column
render(value, row) => ReactNodeCustom cell renderer