DragPreviewImage
Component that renders an HTML Image element as a drag preview.
usage
<script lang="ts" setup> import { DragPreviewImage, useDrag } from 'vue3-dnd' const [collect, drag, dragPreview] = useDrag(() => ({ type: 'Box', })) </script> <template> <DragPreviewImage :connect="dragPreview" src="house_dragged.png" /> <div :ref="drag">🏠</div> </template>
copy success
Props
Parameters | Description | Type | Required |
---|---|---|---|
src | src of the image | string | yes |
connect | dragPreview connector | function | yes |