npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@adapttable/shadcn

v3.2.3

Published

shadcn/ui adapter for AdaptTable — a fully-styled React data table in one import, built on the headless @adapttable/core engine and shadcn's design tokens.

Readme

@adapttable/shadcn

@adapttable/shadcn — a shadcn/ui data table built on AdaptTable

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

The shadcn/ui adapter for AdaptTable — a fully-styled React data table in one import, with sorting, filtering, URL-synced state, selection + bulk actions, column management, RTL, and dark mode. It's a thin wrapper over @adapttable/unstyled that applies the shadcn class preset for you, built on the headless @adapttable/core engine.

pnpm add @adapttable/shadcn @adapttable/core react react-dom

Requires shadcn/ui set up in your app (its CSS variables + Tailwind config) — this adapter only references shadcn's design tokens (bg-card, text-muted-foreground, border-border, bg-primary, …).

The preset ships utility classes in this package, so let Tailwind scan it or they won't compile. In Tailwind v4, add it as a source in your CSS:

@source "../node_modules/@adapttable/shadcn/dist/**/*.js";

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

Quickstart

import { DataTable, useFrontendData, type ColumnDef } from "@adapttable/shadcn";

interface Person {
  id: string;
  name: string;
  city: string;
}

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<Person>({ data, columns });
  return <DataTable source={source} columns={columns} rowKey={(r) => r.id} />;
}

That's it — a styled shadcn table, no class wiring. Swap useFrontendData for useQuerySource to drive it from a server-paginated query; the component doesn't change.

Features

  • Automatic mobile cards — below the mobile breakpoint every row renders as a shadcn-styled 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 Sheet or Popover 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 shadcn 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/shadcn/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 your Tailwind dark: class strategy.
  • Customisation — the components are copied into your project — edit them directly, plus slots, className, injectable confirm, and the full headless escape hatch via @adapttable/react.

Customizing

Restyle any part by passing your own classNames — they're merged over the preset, per part, so you only override what you name:

<DataTable
  source={source}
  columns={columns}
  rowKey={(r) => r.id}
  classNames={{ root: "rounded-2xl border-2 border-primary" }} // only the root changes
/>

Need the raw class map (e.g. to spread into your own @adapttable/unstyled table)? It's exported:

import { shadcnClassNames } from "@adapttable/shadcn";

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

shadcn Row grouping

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

shadcn Inline cell editing

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

shadcn Filtering

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

shadcn Column management

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

shadcn RTL / Arabic

Documentation

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

License

MIT © Orwa Mahmoud