@adapttable/radix

中文文档
3.3.11发布于 2026/11/02MITTypeScriptESM + CJS构建来源已验证近 30 天下载 2017

Radix Themes adapter for AdaptTable — a batteries-included Radix data table with sorting, filtering, URL state, selection, RTL, and dark mode.

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

@adapttable/radix

@adapttable/radix — a Radix Themes data table built on AdaptTable

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

The Radix Themes adapter for AdaptTable — a batteries-included Radix data table with sorting, filtering, URL-synced state, selection + bulk actions, RTL, and dark mode. Built on the headless @adapttable/core engine. (Targets @radix-ui/themes v3.)

pnpm add @adapttable/radix @adapttable/core @radix-ui/themes react react-dom

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

Quickstart

import { Theme } from "@radix-ui/themes";
import "@radix-ui/themes/styles.css";
import { DataTable, useFrontendData, type ColumnDef } from "@adapttable/radix";

const columns: ColumnDef<Person>[] = [
  { key: "name", header: "Name", accessor: (r) => r.name, sortable: true },
  { key: "city", header: "City", accessor: (r) => r.city },
];

export function People({ data }: { data: Person[] }) {
  const source = useFrontendData({ data, columns });
  return (
    <Theme accentColor="iris">
      <DataTable source={source} columns={columns} rowKey={(r) => r.id} />
    </Theme>
  );
}

Appearance follows the surrounding <Theme> — light/dark, accent, and radius; pass accentColor to tint the table's own accents. Swap useFrontendData for useQuerySource to drive the same table from a server-paginated query.

Features

  • Automatic mobile cards — below the mobile breakpoint every row renders as a Radix Card (same filters, search, selection and URL state) and infinite scroll replaces the pager; tune per column with mobileLabel / hideOnMobile, pin either layout with forceMobile. See it flip live.
  • Client or server data through one TableSource contract — same props either way.
  • Global search box — debounced; matches each row's searchable text on client data and hands the term to the backend on a server tier. Turn it off with searchable={false}.
  • URL-synced search / sort / filters / page — shareable, deep-linkable links.
  • Sorting via sortable headers.
  • Filtering — a Popover or Dialog of filters plus removable Badge chips, with a filter count on the trigger. Nested AND/OR filter tree in the same panel.
  • Header filters (headerFilters()) — a funnel in each filtered column's header opens the same field as the Filters panel, bound to the same state, URL params and chips.
  • Custom filter types (filterTypes([...])) — register a FilterTypeSpec with its own widget, operators and predicate; it gets the form field, header funnel, URL params and chips.
  • Selection + bulk actions using Radix Checkboxes, composed with bulkActions(...).
  • Row actions with optional confirm, isHidden / isDisabled per row.
  • Row expansion — inline detail panels via rowDetail(...).
  • Nested tables (nestedTable(...)) — a full DataTable with its own columns, sorting and paging inside an expanded row.
  • Inline cell editing (editing(handler) + editable columns) — text, number and select editors; Enter commits, Escape cancels, Tab moves on. Omit the handler and no cell opens.
  • Row reordering (rowReorder(handler)) — drag handle, Space-lift keyboard, dataset-relative indices.
  • Row pinning (rowPinning(...)) — sticky top and bottom rows outside the virtual window.
  • Pinned summary rows (pinnedSummaryRows(...)) — host-owned totals stuck outside sort, filter, grouping, pagination and selection, including on grouped and tree tables.
  • Row and column spanning (cellSpan(...)) — one cell list per row; covered cells are omitted.
  • Full-width and separator rows (extraRows(...)) — host-injected slots spliced in by beforeRowId.
  • Row styling and heights (rowAppearance(...)) — conditional inline style and per-row height.
  • Keyboard cell navigation (cellNavigation()) — one tab stop, arrow keys, ARIA grid semantics and screen-reader announcements. It is also the gate for cell-range selection, clipboard copy/paste of a range, and the fill handle.
  • Row grouping (grouping(...) or groupingPanel(...)) — one column key or an ordered list to nest, with per-group aggregates.
  • Aggregation — a footer summaryRow, group subtotals from aggregatable columns, and built-in or custom aggregate() operations; totals recompute from the filtered rows.
  • Pivot tables — rows, columns and measures with subtotals, from the optional @adapttable/core/pivot entry.
  • Tree data (tree(...)) — hierarchical rows with expand/collapse, on desktop and on cards.
  • Column management — show/hide, reorder, pin (sticky) and resize, plus collapsible column groups.
  • Sparkline columns (@adapttable/react/sparkline) — bar, line and area as inline SVG. The base bundle never pays for it.
  • 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!.
  • Feature composition (features={[rowReorder(fn)]}) from @adapttable/radix/row-reorder-style subpaths — the import is the switch, and standardFeatures() on the /preset entry is the one-import path. Host plugins share the same setup(host) surface.
  • Saved views — name a filter/sort/column arrangement and switch between them.
  • 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 (commandPalette(), contextMenu()) — Cmd/Ctrl+K opens a searchable list of table actions; right-click opens a menu for the header, row or cell.
  • View controls — densityChooser(), fullscreen(), print(...), statusBar(), selectionStats(), sidePanel(...) and undoRedoButtons(), each an opt-in toolbar control from its own subpath.
  • Virtualization (virtualize(...)) — opt-in row/card windowing for very large lists.
  • Pagination — numbered pagination, or infinite scroll (auto by device).
  • SSR & server components — renders with no DOM; the client boundary is already in the build, so it drops straight into the Next.js App Router. Docs.
  • States — Skeleton loading, error with retry, and an empty state.
  • RTL via dir; dark mode via the Radix Themes appearance.
  • Customisation — slots, size, accentColor, className, injectable confirm, and the full headless escape hatch via @adapttable/react.

See it work

Each clip is the real adapter, recorded on the live demo.

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

radix Row grouping

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

radix Inline cell editing

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

radix Filtering

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

radix Column management

RTL / Arabic — the whole table mirrors, not just the text

radix RTL / Arabic

Documentation

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

License

MIT © Orwa Mahmoud

版本与发布记录

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

版本发布日期距今
3.3.11latest2026/11/026 天前
3.3.102026/10/317 天前
3.3.92026/10/2216 天前
3.3.82026/10/1623 天前
3.3.72026/10/1424 天前
3.3.62026/10/1325 天前

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

关于 @adapttable/radix 的常见问题

@adapttable/radix 是什么?

Radix Themes adapter for AdaptTable — a batteries-included Radix data table with sorting, filtering, URL state, selection, RTL, and dark mode.

如何安装 @adapttable/radix?

在项目目录运行 npm install @adapttable/radix,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^18.0.0 || ^19.0.0)、react-dom(^18.0.0 || ^19.0.0)、@radix-ui/themes(^3.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@adapttable/radix 支持 TypeScript 吗?

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

@adapttable/radix 支持 ESM 还是 CommonJS?

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

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

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

@adapttable/radix 可以商用吗?

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

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

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

@adapttable/radix 还在维护吗?

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