Home / Function/ DragHandle() — ui Function Reference

DragHandle() — ui Function Reference

Architecture documentation for the DragHandle() function in data-table.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  74971eaa_7c7a_8a79_e783_f52d1f131bb2["DragHandle()"]
  8ad238ff_a39a_3d1c_9d4f_36efa918de96["data-table.tsx"]
  74971eaa_7c7a_8a79_e783_f52d1f131bb2 -->|defined in| 8ad238ff_a39a_3d1c_9d4f_36efa918de96
  style 74971eaa_7c7a_8a79_e783_f52d1f131bb2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/app/(app)/examples/dashboard/components/data-table.tsx lines 120–137

function DragHandle({ id }: { id: number }) {
  const { attributes, listeners } = useSortable({
    id,
  })

  return (
    <Button
      {...attributes}
      {...listeners}
      variant="ghost"
      size="icon"
      className="text-muted-foreground size-7 hover:bg-transparent"
    >
      <IconGripVertical className="text-muted-foreground size-3" />
      <span className="sr-only">Drag to reorder</span>
    </Button>
  )
}

Subdomains

Frequently Asked Questions

What does DragHandle() do?
DragHandle() is a function in the ui codebase, defined in apps/v4/app/(app)/examples/dashboard/components/data-table.tsx.
Where is DragHandle() defined?
DragHandle() is defined in apps/v4/app/(app)/examples/dashboard/components/data-table.tsx at line 120.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free