Resizable / Reorderable Columns
shadcn-table-library/resizable-reorderable-columns-tableFreeBlock
Drag a header's grip to reorder columns, drag its edge to resize, with the resulting layout persisted to localStorage.
Install it
npx shadcn@latest add https://shad-table.dev/r/resizable-reorderable-columns-table.jsonSource
1'use client'23import type { ColumnDef } from '@tanstack/react-table'45export type User = {6 id: string7 name: string8 email: string9 role: string10 status: string11}1213export const columns: ColumnDef<User>[] = [14 {15 id: 'name',16 accessorKey: 'name',17 header: 'Name',18 size: 180,19 minSize: 100,20 maxSize: 400,21 },22 {23 id: 'email',24 accessorKey: 'email',25 header: 'Email',26 size: 220,27 minSize: 140,28 maxSize: 400,29 },30 {31 id: 'role',32 accessorKey: 'role',33 header: 'Role',34 size: 140,35 minSize: 80,36 maxSize: 300,37 },38 {39 id: 'status',40 accessorKey: 'status',41 header: 'Status',42 size: 120,43 minSize: 80,44 maxSize: 300,45 },46]
What it pulls in
npm packages
Other registry items
Files it writes
More from shadcn-table-library
All 18 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Animated Icons Tableanimated-icons-table | shadcn-table-library | Blocks | Free | 2 deps · 9 files | |
| Comparison Tablecomparison-table | shadcn-table-library | Blocks | Free | 1 dep · 4 files | |
| Data Tabledata-table | shadcn-table-library | Blocks | Free | 1 dep · 4 files | |
| Density & Exportdensity-export-table | shadcn-table-library | Blocks | Free | 1 dep · 4 files | |
| Editable Tableeditable-table | shadcn-table-library | Blocks | Free | 1 dep · 3 files | |
| Grouped Tablegrouped-table | shadcn-table-library | Blocks | Free | 1 dep · 3 files | |
| Heatmap Tableheatmap-table | shadcn-table-library | Blocks | Free | 1 dep · 4 files | |
| Summary / KPI Tablekpi-table | shadcn-table-library | Blocks | Free | 1 dep · 5 files |
