Table of Contents

Method UseDraggable

Namespace
Velvet
Assembly
Velvet.Docs.dll

UseDraggable(string)

Returns the drag state of the draggable id names under the nearest V.DndContext — dnd-kit's useDraggable, read-only: the element still carries V.Draggable or the Draggable slot. The component re-renders when the active draggable or the target it is over changes, and on every move while this draggable is the one dragged, for Transform.

public static DraggableState UseDraggable(string id)

Parameters

id string

The draggable's id. Must not be null.

Returns

DraggableState

The draggable's current drag state.