Skip to content

Base Drop

Default drop and drag: one draggable element, two zones (outer and inner). On drop we set a ref so the element is shown inside the zone that received it (rendered with v-if).

Demo

Source

What’s used

  • DnDProvider — wraps the example.
  • ZonemakeDroppable, emits drop; highlights on enter/leave.
  • DraggableItemmakeDraggable on a template ref.
  • Ref droppedZonenull | 'outer' | 'inner'; on drop the zone sets it, and the item is rendered with v-if in that zone or in the start area.

Released under the MIT License.