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

Shadcn Sortable Grid Layout

Sortable list of items with grid layout. Built by composing Badge, Sortable. Uses cn, sonner alongside the shadcn primitives. A free, open source shadcn sortable example you can install with npx shadcn@latest add @reui/c-sortable-2 and edit as your own code.

Sortable list of items with grid layout

For AI Agents

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

Best for: Asset cards with a title, a one line description and a colored type badge in an equal height 3 column layout, grips shown on hover

When to use

  • Ranked lists such as a play queue, notification channels or release tasks, put in order by a grip
  • Tile grids such as a media library, where cards change places across rows and columns
  • Grouped options and menus reordered in place, such as product variants or sidebar menu entries

When not to use

  • A single column of rows in place of tiles spread across the width: use the Sortable File List example
  • Cards that move between several status columns on one board: use the Kanban component
  • Ranked table rows that keep several columns of values lined up: use the Drag & Drop blocks
  • A whole page layout of sidebar, top bar and content area around the list: use the App Shell blocks

Agent notes

  • getItemSize sets col-span-2 on the card inside SortableItem rather than on the grid cell, so the featured card fills 1 cell like the rest
  • Replace defaultGridItems; its priority field is never rendered
  • Drag listeners sit on SortableItemHandle only, so a SortableItem rendered without one cannot be dragged
  • Passing onMove skips the built-in reorder, so neither onValueChange nor onValueCommit fires on drop
  • The drag preview clones the child of Sortable whose value matches the dragged item, so a wrapper around SortableItem needs that value too

Third-party API docs

  • Sonner v2: API reference, docs
Markdownhttps://reui.io/components/sortable/c-sortable-2.md
MCPget_example("c-sortable-2")
Installnpx shadcn@latest add @reui/c-sortable-2
Full index for agents:llms.txtReUI MCP setup

Shadcn Components in Sortable Grid Layout

  • Badge
  • Sortable

Dependencies

  • cn
  • sonner

About Shadcn Sortable Grid Layout

Sortable list of items with grid layout. Built by composing Badge, Sortable. Uses cn, sonner alongside the shadcn primitives. A free, open source shadcn sortable example you can install with npx shadcn@latest add @reui/c-sortable-2 and edit as your own code.

What You Can Build With Shadcn Sortable Grid Layout

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

More Shadcn Sortable Examples

  • File List Sortable list of items with drag-and-drop
  • Nested Layout Sortable list of items with nested layout
  • Playlist Sortable playlist with frame
  • Settings Priority Sortable settings priority with frame
  • Sidebar Navigation Sortable sidebar navigation with frame
  • Image Gallery Sortable image gallery grid with frame
  • Persisted Order Sortable list persisted to a backend

Related Shadcn Component Categories

  • Spinner

    Open-source shadcn spinner components for loading indicators, async actions, and button states.

  • Stepper

    Open-source shadcn stepper components for multi-step forms, checkout flows, and onboarding.

  • Switch

    Open-source shadcn switch components for settings toggles, preferences, and binary choices.

  • Table

    Open-source shadcn table components for admin tables, data display, and responsive lists.

  • Tabs

    Open-source shadcn tabs components for segmented content, settings views, and dashboard sections.

  • Textarea

    Open-source shadcn textarea components for comments, long-form input, and support tickets.

Frequently Asked Questions

When should I use Shadcn Sortable Grid Layout?

Use it for asset cards with a title, a one line description and a colored type badge in an equal height 3 column layout, grips shown on hover.

Shadcn Sortable as a whole fits:

  • Ranked lists such as a play queue, notification channels or release tasks, put in order by a grip
  • Tile grids such as a media library, where cards change places across rows and columns
  • Grouped options and menus reordered in place, such as product variants or sidebar menu entries

For a single column of rows in place of tiles spread across the width, use the Sortable File List example. For cards that move between several status columns on one board, use the Kanban component. For ranked table rows that keep several columns of values lined up, use the Drag & Drop blocks. For a whole page layout of sidebar, top bar and content area around the list, use the App Shell blocks.

How do I install Shadcn Sortable Grid Layout?

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

Is Shadcn Sortable Grid Layout free to use?

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

Which components does Shadcn Sortable Grid Layout use?

It composes Badge, Sortable. The shadcn CLI installs those alongside the example.
PreviousFile ListNextNested Layout

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