Home Components Data Table
React Data Table Components
13 free React data tables built with Tailwind CSS and shadcn/ui conventions. Copy the code or install with the shadcn CLI. Great for sorting, filtering, pagination, and row selection.
DataTable 1 : Invoice table with row checkboxes, a select all header checkbox and right-aligned currency amounts.DataTable 2 : Invoice table with a density select that switches rows between compact, standard and flexible spacing.DataTable 3 : Invoice table with a Columns dropdown to show or hide each column, searchable and resettable.DataTable 4 : Product table with a filter bar for name search, price and rating ranges and availability, plus thumbnails.DataTable 5 : Selectable client invoice table whose column visibility menu has a search box and a Reset option.DataTable 6 : Invoice table with drag-to-resize column edges that snap back to default width on double click.DataTable 7 : Product inventory table where any column can be pinned to the left or right edge from a header menu.DataTable 8 : Employee table with drag and drop column reordering and click-to-sort headers.DataTable 9 : Team table with expandable rows that open a nested table of each team's members.DataTable 10 : Sortable product table with a rows per page select, a range counter and first, previous, next and last buttons.DataTable 11 : Sortable product table with numbered page buttons, ellipses and a Page X of Y label.DataTable 12 : Payments table with search across all columns and export of selected or filtered rows to CSV, Excel or JSON.DataTable 13 : Editable table with inline text inputs, a status select and progress fields, plus a Refresh Data reset.
About React Data Table Components A React data table is a table with built-in behavior, such as sorting, filtering, row selection, and pagination, for working with many records. Watermelon UI data tables are built on the shadcn Table with Tailwind CSS, using React state together with checkboxes, inputs, selects, and dropdown menus. Add one with the shadcn CLI, then replace the sample rows and columns with your data.
When to use it Admin screens for users, orders, or invoices. Lists where people need to search, sort, and act on rows in bulk. Reports that split long results across pages. When to use something else Use Table when the data is short and read-only, with no sorting or selection. Use Card when each item has a picture or very different fields and reads better as a tile. Frequently asked questions Do I need TanStack Table for a shadcn data table? No. Watermelon UI’s data tables handle sorting, filtering, and selection with plain React state, so there is no extra table library to install. For very large or complex grids, you can move to TanStack Table later.
How do I add row selection with checkboxes? Keep a set of selected row IDs in state and render a Checkbox in each row and in the header. Show the header checkbox as indeterminate when only some rows are selected.
How do I sort a column when the header is clicked? Store the sort key and direction in state, sort a copy of the rows before rendering, and toggle direction on each header click. Add aria-sort to the active header.
Should I paginate on the client or the server? Paginate on the client when all rows are already loaded and the list is small. For large datasets, fetch one page at a time from the server and pass the page and total count to the table.
How to use React Data Table Components Start from a React project with Tailwind CSS and shadcn/ui set up. Next.js, Vite, Remix, and Astro all work. Run npx shadcn@latest add https://registry.watermelon.sh/r/data-table-1.json to add the source files to your project. Import it where you need it, then edit the Tailwind classes and design tokens to match your product. Dependencies installed with it: lucide-react, @dnd-kit/core, @dnd-kit/modifiers, @dnd-kit/sortable, @dnd-kit/utilities, papaparse, write-excel-file.
The code is yours: it lives in your repository, so there is no runtime package to keep updated. Watermelon UI is free and open source under the MIT license.
More: Free React components , UI library alternatives , guides .