Table of Contents

Method DragOverlay

Namespace
Velvet
Assembly
Velvet.Docs.dll

DragOverlay(VNode?[]?, string?, DndDropAnimation?, IReadOnlyList<DndModifier>?)

Drag preview, dnd-kit's DragOverlay: a component rendering a framework-positioned, picking-ignored positioner, through V.Portal(UILayer.Overlay) in a runtime mount and in place in an editor-panel mount, that is sized to the drag source at activation and tracks the drag while one is active (hidden otherwise). Render preview content conditionally from state set in onDragStart/onDragEnd; through the drop animation it keeps showing the last content it showed.

public static ComponentNode DragOverlay(VNode?[]? children = null, string? key = null, DndDropAnimation? dropAnimation = null, IReadOnlyList<DndModifier>? modifiers = null)

Parameters

children VNode[]

The preview content.

key string

Key used to disambiguate siblings at the same position.

dropAnimation DndDropAnimation

How the overlay returns to the source when a drag ends or is cancelled; null means Default, and None hides it at once.

modifiers IReadOnlyList<DndModifier>

Applied in order to the overlay's position after the scope's own modifiers.

Returns

ComponentNode

The created ComponentNode.