@adapttable/core

中文文档
3.13.1发布于 2026/11/02MITTypeScriptESM + CJS零依赖构建来源已验证近 30 天下载 6673

Framework-neutral AdaptTable engine — models, state, URL sync, and a unified client/server TableSource. Zero UI-kit or React imports.

原始使用文档
文档目录4 节
  1. Features
  2. See it work
  3. Documentation
  4. License

@adapttable/core

AdaptTable — one headless engine: the same table re-rendered through Mantine, MUI, Chakra, Ant Design, Radix, shadcn, and Tailwind

📖 Documentation · 🚀 Live demo · Get started · ⚡ Try in StackBlitz

Migrating from TanStack Table? See the migration guide.

The framework-neutral engine behind AdaptTable — state, models, query codecs and the unified client/server TableSource contract, with no React or UI-kit imports in its graph.

pnpm add @adapttable/core

You usually want a styled adapter on top (@adapttable/mantine, @adapttable/mui, @adapttable/chakra, @adapttable/unstyled). Reach for @adapttable/react when you want hooks and prop-getters to render your own markup.

Requires Node.js 22.12.0 or newer; packed releases are tested on Node 22.12 and Node 24.

Features

Core supplies the state, data transforms and contracts behind the complete table surface below. React hooks, keyboard wiring and rendered controls live in @adapttable/react and the kit adapters.

  • Automatic mobile cards — core preserves one row/state model while the React and adapter layers render cards below the mobile breakpoint. Docs.
  • Client or server data through one TableSource contract — same props either way.
  • Global search — the committed term, its q URL param and the default searchable-text projection (engineSearchText); adapters render the search box.
  • URL-synced search / sort / filters / page — shareable, deep-linkable links.
  • Pagination — paged or infinite scroll via paginationMode; server sources report their own totals, client sources derive them.
  • SSR & server components — the engine has no DOM dependency; the React binding supplies the client boundary for the Next.js App Router. Docs.
  • A React-free half (@adapttable/core/query) — the filter-tree and pivot URL codecs on their own, so a route handler can decode a shared link in a process with no React installed.
  • A conformance suite (@adapttable/core/conformance) — the DOM assertions every built-in adapter passes, runnable against any binding or kit through a driver and the test runner of your choice. Docs.
  • Sorting — comparator resolution and multi-key sortValue; React turns the result into accessible header state.
  • Filtering — filter model, operators and counts, including a nested AND/OR filter tree; adapters render the forms and chips.
  • Header filters — the filter chrome model behind headerFilters(); adapters draw the header funnel.
  • Custom filter types — the FilterTypeSpec registry behind FILTER_TYPES: widget, operators, predicate, chips and URL params per type.
  • Selection + bulk actions — selected ids and the bulk-action contract; adapters render tri-state controls and dialogs.
  • Row actions — contracts for visibility, disabled state and confirmation; adapters own the controls.
  • Row expansion — state behind the React binding's rowDetail(...) feature.
  • Nested tables — the React layer's nestedTable(...) renders a full kit DataTable inside an expanded row.
  • Inline cell editing — state behind editing(handler) and editable columns; text, number and select editors, keyboard commit/cancel, Tab advance. Omit the handler and no cell opens.
  • Row reordering — rowReorder(handler); Space-lift keyboard, dataset-relative indices.
  • Row pinning — rowPinning(...); sticky top and bottom rows.
  • Pinned summary rows — pinnedSummaryRows({ top, bottom }); host-owned totals outside the row model.
  • Row and column spanning — the model behind cellSpan(...).
  • Full-width and separator rows — extraRows.
  • Row styling and heights — the model behind rowAppearance(...).
  • Keyboard cell navigation — core state supports the React layer's cellNavigation() feature, which adds ARIA grid semantics, arrow-key movement and screen-reader announcements.
  • Row grouping — model support for grouping(...) and groupingPanel(...).
  • Aggregation — aggregate(), aggregatable column operations and the aggregation model behind footer and group totals, including custom operations.
  • Pivot tables — rows, columns and measures with subtotals and collapsible groups, from the optional @adapttable/core/pivot entry.
  • Tree data — the hierarchy model behind tree(...).
  • Column management — show/hide, reorder, pin (sticky) and resize state, plus collapsible column groups.
  • Sparkline columns — the React layer's @adapttable/react/sparkline renders bar, line and area charts as inline SVG.
  • PDF export and print layout (@adapttable/core/pdf) — optional entry; pdfWriter() on exportCsv, printTable for the browser dialog.
  • Formula engine (@adapttable/core/formula) — spreadsheet formulas over rows and aggregates; circular refs report #CYCLE!.
  • Live row patches (@adapttable/core/stream) — wire parsing and socket connection without React; useRowPatchStream lives at @adapttable/react/stream.
  • Saved views — name a filter/sort/column arrangement and switch between them.
  • Feature composition foundations — framework-neutral state and contracts power the factories exposed by @adapttable/react/features and each kit subpath. Host plugins use the same TableFeature / setup(host) surface.
  • CSV export (exportCsv(...)) — current page, the full filtered set, or the selected rows; choose the columns, or hand the whole thing to your backend.
  • XLSX export (@adapttable/core/xlsx) — optional entry; xlsxWriter() on exportCsv writes a real .xlsx workbook with no extra dependency.
  • Command palette and context menus — the Command / ContextMenuItem model and the built-in tableCommands / filterCommands; adapters render commandPalette() and contextMenu().
  • View controls — localized labels for density, fullscreen, print, status bar and side panel; the React layer and adapters own the toolbar controls.
  • Virtualization (virtualize(...)) — row/card windowing for very large lists.
  • RTL and i18n-agnostic labels — pass labels or a t function.
  • Framework-neutral — no components, styling, React or UI-kit imports.

See it work

One dataset, re-rendered by each adapter — these clips are the cross-kit tour.

Row grouping — group rows by a column with per-group subtotals

row-grouping

Inline cell editing — double-click a cell; text, number and select editors

cell-editing

Filtering — type a bound and the table answers as you type

filtering

Column management — show, hide, reorder, pin and resize

column-management

RTL — the whole table mirrors, not just the text

rtl

Documentation

Getting started · Live demo · Comparison vs ag-Grid · MUI X · TanStack

License

MIT © Orwa Mahmoud

版本与发布记录

@adapttable/core 共发布 49 个版本,首次发布于 2026/06/12;过去 12 个月发布了 49 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
3.13.1latest2026/11/024 天前
3.13.02026/10/316 天前
3.12.02026/10/2215 天前
3.11.02026/10/1621 天前
3.10.02026/10/1422 天前
3.9.12026/10/1323 天前

其他发布通道:rc → 2.0.0-rc.0。

关于 @adapttable/core 的常见问题

@adapttable/core 是什么?

Framework-neutral AdaptTable engine — models, state, URL sync, and a unified client/server TableSource. Zero UI-kit or React imports.

如何安装 @adapttable/core?

在项目目录运行 npm install @adapttable/core,或使用 pnpm add / yarn add / bun add。

@adapttable/core 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@adapttable/core 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@adapttable/core 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.12.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@adapttable/core 可以商用吗?

@adapttable/core 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@adapttable/core 的下载量有多少?

根据 npm 官方下载统计,@adapttable/core 在 2026/10/05 – 2026/11/03 这 30 天内被下载 6,673 次,日均约 222 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@adapttable/core 还在维护吗?

最新版本 3.13.1 发布于 2026/11/02(4 天前);至今共发布 49 个版本,其中过去 12 个月发布了 49 个;首次发布于 2026/06/12。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。