---
title: "Data Table"
description: "A source-owned TanStack Table v9 starter with native table semantics and composable edbn controls."
plan: Pro
docs: https://ui.edbn.me/docs/tables/data-table
example: basic
---

# Data Table

A source-owned TanStack Table v9 starter with native table semantics and composable edbn controls.

DataTable takes a TanStack Table instance and adds a screen-reader caption, a sticky header and overlay scrollbars, in a card or flush variant with toolbar and footer slots. height fixes the viewport and minRows reserves space, so filters, short pages and the empty message never change its size, and skeletonRows draws placeholder rows during the first load.

The kit adds sortable headers with Shift for multi-sort, faceted and range filters, a View menu for columns, pagination, comfortable or compact rows and CSV export.

## Installation

This is a Pro item. Once per project, create a token at https://ui.edbn.me/dashboard/tokens, put it in `.env.local` as `EDBN_TOKEN`, and add the registry to `components.json`:

```json
{
  "registries": {
    "@edbn": {
      "url": "https://ui.edbn.me/r/{name}.json",
      "headers": { "Authorization": "Bearer ${EDBN_TOKEN}" }
    }
  }
}
```

Then install:

```bash
npx shadcn@4.19.0 add @edbn/data-table
```

## Dependencies
- npm: @base-ui/react@^1.8.0, @tanstack/react-table@^9.2.4, lucide-react@^1.33.0
- edbn: edbn-base, table, button, checkbox, command, dropdown-menu, input, popover, select

## Usage: Basic

The example code is part of Pro (https://ui.edbn.me/pricing). With the user's token, the edbn MCP server's `get_example` tool returns it: https://ui.edbn.me/mcp

## Examples
- [Basic](https://ui.edbn.me/docs/tables/data-table/basic) (Markdown: https://ui.edbn.me/docs/tables/data-table.md?demo=basic)
- [Sorting](https://ui.edbn.me/docs/tables/data-table/sorting) (Markdown: https://ui.edbn.me/docs/tables/data-table.md?demo=sorting)
- [Filtering](https://ui.edbn.me/docs/tables/data-table/filtering) (Markdown: https://ui.edbn.me/docs/tables/data-table.md?demo=filtering)
- [Pagination](https://ui.edbn.me/docs/tables/data-table/pagination) (Markdown: https://ui.edbn.me/docs/tables/data-table.md?demo=pagination)
- [Selection](https://ui.edbn.me/docs/tables/data-table/selection) (Markdown: https://ui.edbn.me/docs/tables/data-table.md?demo=selection)
- [Visibility](https://ui.edbn.me/docs/tables/data-table/visibility) (Markdown: https://ui.edbn.me/docs/tables/data-table.md?demo=visibility)
- [Actions](https://ui.edbn.me/docs/tables/data-table/actions) (Markdown: https://ui.edbn.me/docs/tables/data-table.md?demo=actions)
- [Complete](https://ui.edbn.me/docs/tables/data-table/complete) (Markdown: https://ui.edbn.me/docs/tables/data-table.md?demo=complete)
- [States](https://ui.edbn.me/docs/tables/data-table/states) (Markdown: https://ui.edbn.me/docs/tables/data-table.md?demo=states)
- [Live data](https://ui.edbn.me/docs/tables/data-table/live-data) (Markdown: https://ui.edbn.me/docs/tables/data-table.md?demo=live-data)
- [Range filters](https://ui.edbn.me/docs/tables/data-table/range-filters) (Markdown: https://ui.edbn.me/docs/tables/data-table.md?demo=range-filters)
- [Export](https://ui.edbn.me/docs/tables/data-table/export) (Markdown: https://ui.edbn.me/docs/tables/data-table.md?demo=export)
- [Density](https://ui.edbn.me/docs/tables/data-table/density) (Markdown: https://ui.edbn.me/docs/tables/data-table.md?demo=density)

## Files
- components/data-table/core/data-table.tsx (567 lines)
- components/data-table/core/data-table-scroll-area.tsx (122 lines)
- components/data-table/core/data-table-features.ts (64 lines)
- components/data-table/core/data-table-column-header.tsx (136 lines)
- components/data-table/core/data-table-pagination.tsx (153 lines)
- components/data-table/core/data-table-toolbar.tsx (38 lines)
- components/data-table/core/data-table-view-options.tsx (70 lines)
- components/data-table/core/data-table-faceted-filter.tsx (161 lines)
- components/data-table/core/data-table-status.tsx (52 lines)
- components/data-table/core/data-table-range-filter.tsx (171 lines)
- components/data-table/core/data-table-export.tsx (114 lines)
- components/data-table/core/data-table-density.tsx (86 lines)

## For agents
- Base theme, once per project: npx shadcn@4.19.0 add https://ui.edbn.me/r/edbn-base.json
- MCP server with search, items, examples and source: https://ui.edbn.me/mcp
- Every page and item: https://ui.edbn.me/llms.txt
