Free, open-source drag-and-drop table component for shadcn-ui
Built with Next.js, TypeScript, Tailwind CSS, shadcn-ui, and @dnd-kit
Supports row reordering with smooth drag animations
Integrates via shadcn CLI, designed for Next.js projects
MIT-licensed, developed by zenoncao
Shadcn Drag Table is a free, open-source React component by zenoncao, designed to extend shadcn-ui with a table that supports drag-and-drop row reordering. It’s ideal for developers building task management apps, Kanban boards, or data grids in Next.js or React projects, where users need to prioritize or reorganize table rows interactively.
Built with Next.js, TypeScript, Tailwind CSS, shadcn-ui, and @dnd-kit, it leverages TanStack Table for table functionality and @dnd-kit for smooth drag-and-drop interactions. The component integrates via shadcn CLI, ensuring alignment with shadcn-ui’s accessible, customizable design. It addresses community needs for drag-and-drop functionality in shadcn-ui tables, as seen in related discussions (e.g., Reddit post on task list drag-and-drop).
Drag-and-Drop Rows: Reorder table rows with smooth animations using @dnd-kit.
TanStack Table Integration: Inherits robust table features like sorting and filtering.
Accessible Design: Maintains shadcn-ui’s WAI-ARIA compliance for accessibility.
CLI Integration: Install via shadcn CLI for quick setup in shadcn-ui projects.
Responsive Styling: Tailwind CSS ensures adaptability across devices.
TypeScript Support: Type-safe for reliable development.
shadcn-ui Compatibility: Matches shadcn-ui’s aesthetic and accessibility standards.
Free and Open-Source: MIT license allows unrestricted use and customization.
Smooth UX: @dnd-kit provides sleek drag animations for row reordering.
Easy Setup: CLI simplifies integration into Next.js/shadcn-ui projects.
Community Relevance: Fills a gap for drag-and-drop tables in shadcn-ui.
React Dependency: Limited to React/shadcn-ui ecosystems.
Setup Requirements: Needs shadcn-ui, Tailwind CSS, @dnd-kit, and TanStack Table installed.
Row-Only Dragging: Supports row reordering but not column dragging (unlike danielagg’s shadcn-data-table-drag-n-drop-columns).
Client-Side Focus: Drag-and-drop is client-side; server-side persistence requires custom setup.
Limited Documentation: As a newer component, detailed guides may be sparse.
DragTable: Main component for rendering a table with draggable rows.
Table Components: Leverages shadcn-ui’s Table, TableHeader, TableRow, etc., for structure.
DragOverlay: Displays dragged row during reordering for visual feedback.
Shadcn Drag Table is completely free under the MIT license, with no premium tiers.
React: Core framework for the component.
shadcn-ui: Provides accessible, styled table primitives.
Tailwind CSS: Utility-first styling for responsive design.
Next.js: Optimized for Next.js projects.
TypeScript: Ensures type safety.
@dnd-kit: Powers drag-and-drop functionality with sortable utilities.
TanStack Table: Enables table features like sorting and filtering.
A drag-and-drop table component for shadcn-ui, enabling row reordering with @dnd-kit and TanStack Table.
Yes, it’s fully free under the MIT license.
It’s designed for shadcn-ui; non-shadcn-ui use requires replacing dependencies.
Highly customizable via Tailwind CSS, @dnd-kit, and TanStack Table configurations.
Submit your Shadcn product to AllShadcn, get featured, and drive genuine traffic while showcasing your work to the world. Turn your creativity into revenue and begin selling today! 🚀