Grip indicator for drag-and-drop reordering.
View the full component source code below.
import * as React from "react"
import { GripVertical } from "lucide-react"
import { cn } from "@/lib/utils"
function DragHandle({
className,
...props
}: React.ComponentProps<"div">) {
return (
<div
data-slot="drag-handle"
aria-hidden="true"
className={cn(
"flex cursor-grab items-center justify-center text-muted-foreground hover:text-foreground active:cursor-grabbing transition-colors",
className
)}
{...props}
>
<GripVertical className="size-4" />
</div>
)
}
export { DragHandle }
npx shadcn@latest add https://registry.mukoko.com/api/v1/ui/drag-handleFetch this component's metadata and source code from the registry API.
/api/v1/ui/drag-handlecomponents/ui/drag-handle.tsx