Examples
Basic Example
A basic example of Shadcn Table which includes sorting, filtering, search, and pagination features by default
Shadcn Table enables client-side sorting, filtering, search, pagination, column hiding, and more by default. These features can easily be disabled or customized further, but here is a showcase of their default behavior. Be sure to check out a more Advanced Example to see how more features can be customized.
Try it
- Click
First Nameand chooseSort ascending. The rows reorder. - Try column filtering: click
Filter, chooseStateand typeNebraska. Two rows remain. - Remove the filter. All five rows return.
- Open search and type
Ohio. One row remains.
Related guides
Comparison
shadcn-table, TanStack Table, the shadcn/ui data-table recipe, Material React Table and AG Grid compared: install, bases, features, styling, license.
Server-Side Pagination Example
An example of Shadcn Table which shows how to fetch remote data and filter and paginate on a remote server with react-query