Skip to content
zedkit
@zedtech/zedkit-ui

DataTable

Tables with sorting, filtering, pagination plus loading/error/empty states.

Stable@zedtech/zedkit-ui

Wraps: @tanstack/react-table

Click a column header to sort. Type in the filter to search every column.

#1042Camille Rousseau26 Oct€128.50
Paid
#1041Noah Bernard26 Oct€54.90
Pending
#1040Inès Moreau25 Oct€239.00
Shipped
#1039Lucas Petit25 Oct€18.20
Paid
#1038Sofia Garcia24 Oct€76.40
Refunded
#1037Hugo Lambert24 Oct€312.75
Shipped
#1036Léa Fontaine23 Oct€42.00
Paid
#1035Adam Mercier23 Oct€99.99
Pending
#1034Chloé Girard22 Oct€150.30
Paid
#1033Jules Faure21 Oct€27.60
Shipped
Page 1 of 2
View props table
Who is it for?
Developers listing queryable records (deliveries, users, orders).
When should I use it?
For record lists over ~20 rows or needing search.
When should I pick something else?
For a handful of static rows — map a simple table instead.

Use it

Simple
import { DataTable, createDataTableColumns } from "@zedtech/zedkit-ui";
const helper = createDataTableColumns<Item>();
const columns = [helper.accessor("name", { header: "Name" })];
<DataTable columns={columns} data={items} loading={isLoading}
  error={error} emptyMessage="No orders yet." emptyAction={<Button>Add order</Button>}
  pageSize={20} />

Standalone pagination

ProductPrice
Cotton socks9 €
Denim jacket120 €
Rain cape65 €
Beach towel22 €
Straw hat28 €
Page 2 of 4
import { DataTablePagination } from "@zedtech/zedkit-ui";
const [page, setPage] = useState(2);
<DataTablePagination page={page} pageCount={4}
  canPrevious={page > 1} canNext={page < 4}
  onPrevious={() => setPage(page - 1)} onNext={() => setPage(page + 1)} />

Standalone empty row

Search: “gift card”

ProductStockPrice
No product matches “gift card”. Check the spelling or clear the search.
import { DataTableEmpty, Table, TableBody } from "@zedtech/zedkit-ui";
<Table><TableBody>
  <DataTableEmpty colSpan={3} message="Nothing here." />
</TableBody></Table>

Standalone toolbar

6 of 6 customers

CustomerCityOrders
Camille RousseauLyon14
Noah BernardNantes3
Inès MoreauLille9
Lucas PetitLyon1
Sofia GarciaMarseille22
Hugo LambertNantes6
import { DataTableToolbar } from "@zedtech/zedkit-ui";
const [query, setQuery] = useState("");
<DataTableToolbar value={query} onChange={setQuery} />

Kit not installed yet?

This ships on npm only; there is no copy-source brick for it.

You get
Every component from one import, with the theme tokens included. Updates arrive with your package manager.
You need
  • React 19 and Tailwind CSS 4, for example a Next.js app created with the Tailwind option.
  1. Install

    Terminal
    pnpm add @zedtech/zedkit-ui @fontsource-variable/inter @fontsource-variable/space-grotesk
  2. Load the styles

    Tailwind does not scan node_modules, so the @source line points it at the kit's class names. The path is relative to this file.

    src/app/globals.cssReplace the contents
    @import "tailwindcss";
    @import "@zedtech/zedkit-ui/styles.css";
    @source "../../node_modules/@zedtech/zedkit-ui/src/**/*.{ts,tsx}";
    @source not "../../node_modules/@zedtech/zedkit-ui/src/**/*.test.*";
    
  3. Pick a look

    Set data-identity="glass" on <html> so the finished app matches the site. Fresh app: replace src/app/layout.tsx. Existing app: merge, and keep ThemeProvider and other providers.

    src/app/layout.tsxReplace the contents
    import "./globals.css";
    import "./fonts";
    
    export default function RootLayout({ children }: { children: React.ReactNode }) {
      return (
        <html lang="en" data-identity="glass">
          <body>{children}</body>
        </html>
      );
    }
    
  4. Load the fonts

    The Glass look uses Inter and Space Grotesk; these imports self-host them.

    src/app/fonts.tsCreate the file
    import "@fontsource-variable/inter";
    import "@fontsource-variable/space-grotesk";
    
  5. Import and render

    Simple
    import { DataTable, createDataTableColumns } from "@zedtech/zedkit-ui";
    
    const helper = createDataTableColumns<Item>();
    const columns = [helper.accessor("name", { header: "Name" })];
    <DataTable columns={columns} data={items} loading={isLoading}
      error={error} emptyMessage="No orders yet." emptyAction={<Button>Add order</Button>}
      pageSize={20} />
    

Package version 2.0.1.

Props

Prop

Type

Accessibility

Native table semantics (column headers associate by position); head/cell/caption spacing comes from --spacing-table-* theme tokens.

On this page