useDockDrag
AppDock's grip drag. Lifts the bar off its edge, keeps it under the pointer, previews where it will land and hands the landing to useDockFlight. Nothing re-docks mid-drag.
Install: pnpm add-composable useDockDrag
Wiring a grip
The handlers go on the grip. dragStyle goes on the bar.
Previewing a drag from the layout
Page chrome can react to a viewport drag without owning it.
API
barRef(Ref<HTMLElement | null>): The dock bar that follows the pointer.options.position(DockPositionApi): Where the edge is read and written. Defaults to the shared viewport edge.options.bounds(Ref<HTMLElement | null>): The element whose box defines the edges. Pass the dock's container to scope the drag to it.options.local(boolean): Keep drag state out of the module-wide singletons, so several docks drag independently. Set it whenever bounds is set.options.edges(readonly DockPosition[]): The edges the dock may land on.returns(DockDragApi): isDragging, previewPosition, dragStyle, takeLiftScale and the onGrip* pointer and click handlers.useDockDragState(() => { isDragging, previewPosition }): Read-only view of a viewport drag, for page layout that reflows toward the edge being hovered.