UNPKG

motion-v

Version:

<h1 align="center"> <img width="35" height="35" alt="Motion logo" src="https://github.com/user-attachments/assets/00d6d1c3-72c4-4c2f-a664-69da13182ffc" /><br />Motion for Vue</h1>

12 lines (11 loc) 376 B
import { getCurrentInstance, onMounted } from "vue"; import { unrefElement } from "@vueuse/core"; function getMotionElement(el) { if (!el) return void 0; if (el.nodeType === 3 || el.nodeType === 8) return getMotionElement(el.nextSibling); return el; } function getElement(target) { return getMotionElement(unrefElement(target)); } export { getElement, getMotionElement };