Skip to content

1.7.0 @vue-dnd-kit/core

Latest

Choose a tag to compare

@ZiZIGY ZiZIGY released this 30 Jul 02:09
· 2 commits to master since this release

Release Changes

New Features

Overlay Positioning Control

  • overlayPosition.method: Control insertion method (append, prepend, before, after)
  • overlayPosition.target: Specify custom container for overlay insertion (Element, HTMLElement, or CSS selector)
  • overlayPosition.zIndex: Set custom z-index for overlay containers
  • overlayPosition.className: Apply custom CSS classes to overlay containers

Container Props Support

  • containerProps in useDraggable: Pass custom data and configuration to drag container components
  • Support for reactive props (ref, reactive, computed) without .value
  • Full TypeScript support with proper prop validation

Enhanced Plugin Configuration

  • Extended IPluginOptions interface with overlay positioning options
  • Improved useDragContainer with defineProps() integration

Example Usage

// Plugin configuration
app.use(VueDnDKitPlugin, {
  overlayPosition: {
    method: 'before',
    target: document.body,
    zIndex: 9999,
    className: 'custom-overlay-container',
  },
} as IPluginOptions);

// useDraggable with container props
const { elementRef } = useDraggable({
  container: CustomOverlay,
  containerProps: {
    theme: 'dark',
    size: 'large',
    customData: { id: 123, name: 'Item' },
  },
});

Breaking Changes

None! All new features are backward compatible.