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
  95641725_eefc_3179_59e9_1d148659655f["DragHandle()"]
  52fefd13_11d5_abf3_1a95_b2017b8d67f7["data-table.tsx"]
  95641725_eefc_3179_59e9_1d148659655f -->|defined in| 52fefd13_11d5_abf3_1a95_b2017b8d67f7
  style 95641725_eefc_3179_59e9_1d148659655f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

deprecated/www/registry/default/blocks/dashboard-01/components/data-table.tsx lines 121–138

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

  return (
    <Button
      {...attributes}
      {...listeners}
      variant="ghost"
      size="icon"
      className="size-7 text-muted-foreground hover:bg-transparent"
    >
      <GripVerticalIcon className="size-3 text-muted-foreground" />
      <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 deprecated/www/registry/default/blocks/dashboard-01/components/data-table.tsx.
Where is DragHandle() defined?
DragHandle() is defined in deprecated/www/registry/default/blocks/dashboard-01/components/data-table.tsx at line 121.

Analyze Your Own Codebase

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

Try Supermodel Free