PACKAGE · TABLE

@tanstack/react-table

Headless UI for building powerful tables & datagrids for React.

WEEKLY DOWNLOADS 21.3M
STARS 28.5K
FORKS 3.6K
OPEN ISSUES 73
GZIP SIZE 31.8 kB
UNPACKED SIZE 134.5 kB
DEPENDENCIES 2
LAST UPDATED 7mo ago
DOWNLOAD TRENDS

@tanstack/react-table downloads · last 12 months

Download trends for @tanstack/react-table1 download series from Oct 2025 to Sep 2026. Use left and right arrow keys to inspect monthly values.021.7M43.5M65.2M86.9MOct 2025JanAprJulSep 2026
@tanstack/react-table
ABOUT @TANSTACK/REACT-TABLE

The @tanstack/react-table package provides a headless UI solution for building sophisticated tables and data grids within React applications. It addresses the common challenge of managing complex table states, such as sorting, filtering, pagination, grouping, and column resizing, without dictating the markup or styling.

Its core philosophy centers on giving developers complete control over the rendering and presentation layer. This means you bring your own UI components and CSS, while the library handles the complex logic and state management behind the scenes. This approach is ideal for developers who need highly customized table UIs that align perfectly with their application's design system.

The library exposes a powerful set of hooks, such as `useReactTable`, which returns a `table` instance. This instance provides methods and state properties to control and access all table features. Key patterns include managing row selection, expanding rows, pivoting data, and accessing aggregated values, all through a declarative API.

@tanstack/react-table integrates seamlessly into the React ecosystem and supports various meta-frameworks. It's designed to work with modern React patterns, including Server Components, and can be paired with virtually any UI library or CSS framework, offering broad compatibility. It also supports other frameworks like Solid, Svelte, and Vue through separate adapters, indicating its cross-framework design.

With a weekly download count of 20.0 million and significant community traction evidenced by 28.4K GitHub stars, this library is mature and widely adopted. Its unpacked size is 134.5 kB, with a gzipped bundle size of 31.8 kB, making it a relatively lightweight option for the functionality it provides, especially considering its extensibility.

Developers should be aware that the headless nature requires a significant upfront investment in building the UI layer. While it offers immense flexibility, it does not come with pre-built UI components, meaning the developer is responsible for implementing all visual aspects of the table, including accessibility attributes and ARIA roles.

WHEN TO USE
  • When building highly customized data tables where complete control over appearance and behavior is paramount.
  • To implement complex table features like multi-sort, column pinning, row grouping, and hierarchical data display.
  • When integrating table functionality into existing React applications with a specific design system or UI toolkit.
  • To manage large datasets efficiently by leveraging built-in pagination, infinite scrolling, and virtualization support.
  • For applications requiring advanced filtering and searching capabilities across multiple columns with custom logic.
  • When migrating from simpler table implementations to a more robust and feature-rich solution without sacrificing UI control.
  • To utilize its headless architecture to pair with UI libraries like Tailwind CSS, Material UI, or Chakra UI for rapid UI development.
WHEN NOT TO USE
  • If you require a simple, out-of-the-box data grid with minimal customization and pre-built styling, a component library with integrated tables might be more suitable.
  • When the primary need is a basic HTML table display with no interactive features like sorting or filtering, native HTML or a simpler rendering approach is sufficient.
  • If the project's complexity is low and a table with only a few columns and rows requires no advanced state management, the overhead of this library may be unnecessary.
  • When targeting environments that do not support modern JavaScript or React, as this library is specifically built for React.
  • If you prefer a solution that dictates the UI structure and offers opinionated styling, a full-featured UI component suite would be a better fit.

CORRECTIONS

Spot wrong data here?

A short note helps us fix it.

Anonymous · No account · No email back

COMPARISONS 2
@tanstack/react-table vs ag-grid-community ★ 15.6K · 3.3M/wk @tanstack/react-table vs react-virtualized ★ 27.1K · 1.7M/wk