---
title: "Editable Data Table"
description: "A spreadsheet-style TanStack Table grid with arrow-key navigation, in-place editors, validation, and undo."
plan: Pro
docs: https://ui.edbn.me/docs/tables/data-table-editable
example: basic
---

# Editable Data Table

A spreadsheet-style TanStack Table grid with arrow-key navigation, in-place editors, validation, and undo.

DataTableEditable follows the ARIA grid pattern: one tab stop, arrow, Home, End and Page keys between cells, and Enter, F2, double-click or typing to edit. Enter saves, Escape cancels, Tab saves and moves on, and Ctrl or Cmd+Z undoes up to 50 saved edits.

The editors prop gives columns a text, number or select editor and leaves the rest read-only; an invalid value keeps the editor open with the reason under the table. onCellChange hands over each change with its previous value, and the table never writes the data.

## 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-editable
```

## Dependencies
- npm: @tanstack/react-table@^9.2.4, lucide-react@^1.33.0
- edbn: edbn-base, data-table, input, native-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-editable/basic) (Markdown: https://ui.edbn.me/docs/tables/data-table-editable.md?demo=basic)
- [Validation](https://ui.edbn.me/docs/tables/data-table-editable/validation) (Markdown: https://ui.edbn.me/docs/tables/data-table-editable.md?demo=validation)
- [Complete](https://ui.edbn.me/docs/tables/data-table-editable/complete) (Markdown: https://ui.edbn.me/docs/tables/data-table-editable.md?demo=complete)

## Files
- components/data-table/editable/data-table-editable.tsx (314 lines)
- components/data-table/editable/data-table-editable-cell.tsx (180 lines)
- components/data-table/editable/use-data-table-grid-navigation.ts (68 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
