BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/shadcn-customs-ui/data-table-dynamic

Data Grid

shadcn-customs-ui/data-table-dynamic
FreeBlock

A production-ready, editable, draggable data grid with custom cells.

Live preview

live · rendered by the registry
Rendered by shadcn-customs-ui on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://formkitcn.pro/r/data-table-dynamic.json

Source

components/examples/data-table-dynamic.tsxformkitcn.pro/r/data-table-dynamic.json · first 6 KB
1"use client"
2
3import * as React from "react"
4
5import { Badge } from "@/components/ui/badge"
6import { toast } from "sonner"
7import { DynamicColumnDef } from "@/components/data-table/data-table-dynamic/types/column.types"
8import { DynamicDataTable } from "@/components/data-table/data-table-dynamic/core/dynamic-data-table"
9
10// 1. Define Data Type matching your provided data
11type User = {
12 id: string
13 email: string
14 name: string
15 image: string
16 role_id: string
17 password?: string
18 role: { name: string; description: string }
19 email_verified: boolean
20 created_at: string
21}
22
23// 2. Initial Data
24const usersData: User[] = [
25 {
26 id: "1",
27 email: "alice@example.com",
28 name: "Alice Johnson",
29 image: "https://i.pravatar.cc/150?img=32",
30 role_id: "role_admin",
31 password: "hashedpassword1",
32 role: { name: "Admin", description: "Administrator role" },
33 email_verified: true,
34 created_at: "2023-07-01T00:00:00.000Z",
35 },
36 {
37 id: "2",
38 email: "bob@example.com",
39 name: "Bob Martin",
40 image: "https://i.pravatar.cc/150?img=12",
41 role_id: "role_user",
42 password: "hashedpassword2",
43 role: { name: "User", description: "Regular user role" },
44 email_verified: true,
45 created_at: "2023-07-02T00:00:00.000Z",
46 },
47 {
48 id: "3",
49 email: "carla@example.com",
50 name: "Carla Gomez",
51 image: "https://i.pravatar.cc/150?img=45",
52 role_id: "role_manager",
53 password: "hashedpassword3",
54 role: { name: "Manager", description: "Manager role" },
55 email_verified: false,
56 created_at: "2023-07-03T00:00:00.000Z",
57 },
58 {
59 id: "4",
60 email: "daniel@example.com",
61 name: "Daniel Lee",
62 image: "https://i.pravatar.cc/150?img=7",
63 role_id: "role_user",
64 password: "hashedpassword4",
65 role: { name: "User", description: "Regular user role" },
66 email_verified: true,
67 created_at: "2023-07-04T00:00:00.000Z",
68 },
69 {
70 id: "5",
71 email: "eva@example.com",
72 name: "Eva Schultz",
73 image: "https://i.pravatar.cc/150?img=18",
74 role_id: "role_support",
75 password: "hashedpassword5",
76 role: { name: "Support", description: "Support role" },
77 email_verified: false,
78 created_at: "2023-07-05T00:00:00.000Z",
79 },
80]
81
82// 3. Columns Configuration
83const columns: DynamicColumnDef<User>[] = [
84 {
85 accessorKey: "image",
86 header: "",
87 displayMode: "avatar",
88 imageSize: "md",
89 imageAltKey: "name",
90 enableSorting: false,
91 size: 50,
92 },
93 {
94 accessorKey: "name",
95// … truncated

What it pulls in

npm packages

  • date-fns
  • @dnd-kit/core
  • @dnd-kit/modifiers
  • @dnd-kit/sortable
  • @dnd-kit/utilities
  • @tanstack/react-table
  • lucide-react
  • @hookform/resolvers

Other registry items

  • badge
  • calendar
  • button
  • popover
  • input
  • avatar
  • select
  • table
  • tabs
  • checkbox
  • dropdown-menu
  • alert-dialog
  • label

Files it writes

  • components/data-grid/cells/StatusBadgeCell.tsx
  • components/data-grid/cells/DateCell.tsx
  • components/data-grid/cells/EditableTextCell.tsx
  • components/data-grid/cells/AvatarCell.tsx
  • components/data-grid/cells/SelectOptionCell.tsx
  • components/data-grid/core/DataGridFilter.tsx
  • components/data-grid/core/RowDragHandle.tsx
  • components/data-grid/core/SortableRow.tsx
  • components/data-grid/core/DataGrid.tsx
  • components/data-grid/core/row-drag-context.ts
  • components/data-grid/core/DataGridFooter.tsx
  • components/data-grid/core/DataGridToolbar.tsx
  • components/data-grid/hooks/useEditableGrid.ts
  • components/data-grid/inputs/search-input.tsx
  • components/data-grid/types/columns.ts
  • components/data-grid/types/table.ts
  • components/examples/data-table-dynamic.tsx

Facts

Registry
shadcn-customs-ui
Type
registry:block
Access
Free
Files written
17
Licence
the repository states none
First indexed
2026-08-04
Last confirmed
today

Go to the source

Docs on shadcn-customs-ui formkitcn.pro adrian007143/FormkitCN-UI on GitHub Raw registry item This item as JSON

More from shadcn-customs-ui

All 8 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Login Form Templateform-dynamic-templateshadcn-customs-uiBlocksFree5 deps · 7 files
Field Rendererform-fieldshadcn-customs-uiBlocksFree6 deps · 26 files
Form Layoutform-layoutshadcn-customs-uiBlocksFreeno deps · 7 files
Form Layout Templateform-template-01shadcn-customs-uiBlocksFree3 deps
Step Formmultistep-form-templateshadcn-customs-uiBlocksFree6 deps · 6 files
Redux Toolredux-methods-toolshadcn-customs-uiBlocksFree2 deps · 11 files
Theme Preset Tooltheme-preset-toolshadcn-customs-uiBlocksFree1 dep · 22 files
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex