---
title: "Advanced Data Table"
description: "Opt-in TanStack Table controls for pinning, resizing, ordering, grouping, and hierarchical rows."
plan: Pro
docs: https://ui.edbn.me/docs/tables/data-table-advanced
example: pinning
---

# Advanced Data Table

Opt-in TanStack Table controls for pinning, resizing, ordering, grouping, and hierarchical rows.

DataTableAdvanced uses a feature set that adds column resizing, pinning, ordering, grouping with count and sum aggregates, and expandable rows. Pinned columns stick to either edge with an opaque fill and an edge shadow, and the column menu pins a column, moves it and reports its new position through onAnnouncement, or groups by it.

The resize handle works by drag or touch, resets on double-click and steps 8px with the arrow keys, or 24px with Shift; grouped rows show an expander and a count.

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

## Dependencies
- npm: @tanstack/react-table@^9.2.4, lucide-react@^1.33.0
- edbn: edbn-base, data-table, button, dropdown-menu

## Usage: Pinning

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
- [Pinning](https://ui.edbn.me/docs/tables/data-table-advanced/pinning) (Markdown: https://ui.edbn.me/docs/tables/data-table-advanced.md?demo=pinning)
- [Resizing](https://ui.edbn.me/docs/tables/data-table-advanced/resizing) (Markdown: https://ui.edbn.me/docs/tables/data-table-advanced.md?demo=resizing)
- [Ordering](https://ui.edbn.me/docs/tables/data-table-advanced/ordering) (Markdown: https://ui.edbn.me/docs/tables/data-table-advanced.md?demo=ordering)
- [Grouping](https://ui.edbn.me/docs/tables/data-table-advanced/grouping) (Markdown: https://ui.edbn.me/docs/tables/data-table-advanced.md?demo=grouping)
- [Expanding](https://ui.edbn.me/docs/tables/data-table-advanced/expanding) (Markdown: https://ui.edbn.me/docs/tables/data-table-advanced.md?demo=expanding)
- [Complete](https://ui.edbn.me/docs/tables/data-table-advanced/complete) (Markdown: https://ui.edbn.me/docs/tables/data-table-advanced.md?demo=complete)

## Files
- components/data-table/advanced/data-table-advanced.tsx (166 lines)
- components/data-table/advanced/data-table-advanced-features.ts (79 lines)
- components/data-table/advanced/data-table-column-controls.tsx (154 lines)
- components/data-table/advanced/data-table-expander.tsx (58 lines)
- components/data-table/advanced/data-table-resize-handle.tsx (103 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
