DocsSupportPricing
Roadmap (has updates coming soon)XFigma3.7K
Sign inGet All-Access
  1. Components
  2. Data Grid
  3. Data Grid Sortable Columns
DocsMarkdownShare

Shadcn Data Grid Sortable Columns

Data grid with sortable columns. Built by composing Avatar, Data Grid, Data Grid Column Header, Data Grid Pagination, Data Grid Scroll Area and 1 more. Uses @tanstack/react-table alongside the shadcn primitives. A free, open source shadcn data grid example you can install with npx shadcn@latest add @reui/c-data-grid-11 and edit as your own code.

Data grid with sortable columns

For AI Agents

Hand your agent this brief or the ReUI MCP, not a screenshot. Free to install.

Best for: Header buttons that step each column through ascending, descending and unsorted, with an arrow

When to use

  • Admin and back office tables that sort, filter, paginate and select rows
  • Spreadsheet style editing with cell selection, clipboard and inline edits
  • Large record sets that need virtualized rows, columns or infinite scroll

When not to use

  • Headers that also need a menu to shift columns left or right: use the Data Grid Movable Columns example
  • A short static list of rows with no sorting or paging: use the Table component
  • Records moved as cards between status columns: use the Kanban component
  • A folder or category hierarchy with no columns of data: use the Tree component

Agent notes

  • With manualPagination, pass the server total to useTable as rowCount as well as recordCount, or the page buttons never render
  • Give useTable a stable getRowId whenever rows can be pinned, reordered or virtualized
  • Swap DataGridTable for DataGridTableVirtual when rows need virtualization or infinite scroll

Third-party API docs

  • TanStack Table v9: API reference, docs
Markdownhttps://reui.io/components/data-grid/c-data-grid-11.md
MCPget_example("c-data-grid-11")
Installnpx shadcn@latest add @reui/c-data-grid-11
Full index for agents:llms.txtReUI MCP setup

Shadcn Components in Data Grid Sortable Columns

  • Avatar
  • Data Grid

Dependencies

  • @tanstack/react-table

About Shadcn Data Grid Sortable Columns

Data grid with sortable columns. Built by composing Avatar, Data Grid, Data Grid Column Header, Data Grid Pagination, Data Grid Scroll Area and 1 more. Uses @tanstack/react-table alongside the shadcn primitives. A free, open source shadcn data grid example you can install with npx shadcn@latest add @reui/c-data-grid-11 and edit as your own code.

What You Can Build With Shadcn Data Grid Sortable Columns

  • Composes Avatar, Data Grid, so it drops into any project already using those components.
  • Install it with the shadcn CLI: npx shadcn@latest add @reui/c-data-grid-11
  • Open source and free, with the full source on this page to copy or adapt.

More Shadcn Data Grid Examples

  • Pagination Data grid with pagination
  • Cell Borders Data grid with cell border
  • Dense Layout Data grid with dense layout
  • Borderless Data grid without table borders
  • Striped Rows Data grid with striped rows
  • Auto Width Data grid with auto width table layout
  • Row Selection Data grid with row selection
  • Expandable Rows Data grid with expandable rows
  • Sub Table Data grid with sub table
  • Column Icons Data grid with column icons
  • Movable Columns Data grid with movable columns
  • Draggable Columns Data grid with draggable columns

Related Shadcn Component Categories

  • Date Selector

    Open-source shadcn date selector components for date range picking, booking windows, and calendar filters.

  • Dialog

    Open-source shadcn dialog components for modal forms, focused tasks, and confirmations.

  • Drawer

    Open-source shadcn drawer components for mobile panels, slide-over forms, and secondary workflows.

  • Dropdown Menu

    Open-source shadcn dropdown menu components for action menus, profile menus, and toolbar menus.

  • Emoji Picker

    Open-source shadcn emoji picker components for message composers, reactions, page icons, statuses, and custom team emoji.

  • Empty

    Open-source shadcn empty state components for zero-data screens, first-run onboarding, and guided next steps.

Frequently Asked Questions

When should I use Shadcn Data Grid Sortable Columns?

Use it for header buttons that step each column through ascending, descending and unsorted, with an arrow.

Shadcn Data Grid as a whole fits:

  • Admin and back office tables that sort, filter, paginate and select rows
  • Spreadsheet style editing with cell selection, clipboard and inline edits
  • Large record sets that need virtualized rows, columns or infinite scroll

For headers that also need a menu to shift columns left or right, use the Data Grid Movable Columns example. For a short static list of rows with no sorting or paging, use the Table component. For records moved as cards between status columns, use the Kanban component. For a folder or category hierarchy with no columns of data, use the Tree component.

How do I install Shadcn Data Grid Sortable Columns?

Run npx shadcn@latest add @reui/c-data-grid-11. The CLI copies the source into your project, so you own the code and can edit it freely.

Is Shadcn Data Grid Sortable Columns free to use?

Yes. Every ReUI component example is open source and free for personal and commercial projects.

Which components does Shadcn Data Grid Sortable Columns use?

It composes Avatar, Data Grid. The shadcn CLI installs those alongside the example.
PreviousColumn IconsNextMovable Columns

Start building with ReUI Pro today.

Every Pro block, every style, and every future addition, with one license for unlimited projects.

Get All-Access

From $249, once. Lifetime updates.

Application

  • App ShellAdded 4 new App Shell blocks
  • Auth
  • Card
  • Dashboard
  • Dialog
  • Empty State
  • Event Calendar
  • Flow
  • Form
  • Gantt
  • Kanban Board
  • List
  • Navbar
  • Onboarding
  • Profile
  • Rich Text Editor
  • Schedule
  • Settings
  • Sheet
  • Stats
  • Timeline
  • Whiteboard
  • Wizard

Data Grid

  • Base
  • AdvancedNew Advanced category with 3 Data Grid blocks
  • Columns
  • Drag & Drop
  • Editing
  • Expansion
  • Filtering
  • Grouping
  • Virtualization

Charts

  • Area Chart
  • Bar Chart
  • Composed Chart
  • Line Chart
  • Pie Chart
  • Radial Chart
  • Sparkline
  • Status Tracker

AI & Agents

  • AI Chat
  • Agent Activity

Solutions

  • Dev Ops
  • AI Ops
  • CRM
  • Agents
  • Analytics
  • Billing
  • Bookings
  • Files
  • Inventory
  • Users

Templates

  • E-commerce
  • SaaS
  • Dashboard
  • Landing
  • All templates

eCommerce

  • Category Card
  • Checkout
  • Comparison
  • Coupon
  • Filter Sidebar
  • Product Card
  • Product Detail
  • Product Grid
  • Receipt
  • Review
  • Shopping Cart
  • Wishlist
  • Shop Hero

Marketing

  • Blog
  • Compare
  • Contact
  • CTA
  • FAQ
  • Hero
  • How It Works
  • Pricing

Resources

  • Components
  • Blocks
  • Icons
  • MCP for Agents
  • Docs
  • Support
  • Pricing
  • Tailwind Plus Alternative
  • Roadmap(has updates coming soon)
  • AffiliateSoon

Legal

  • Privacy Policy
  • Terms & Conditions
  • License
  • Refunds
  • Cookies

© 2026 ReUI. All rights reserved.

3.7K