DEV Community

Isaac Tewolde
Isaac Tewolde

Posted on

vGhost – new Vue directive to unload offscreen elements without breaking layout

Just released a major new feature: v-ghost, a new Vue directive that automatically unloads elements when they scroll out of view — without breaking layout or scroll position.

You can now keep your DOM light without needing wrapper components or manual logic. Just drop v-ghost on any element:

<template>
  <video v-ghost>
    <source src="your-video.mp4" type="video/mp4" />
  </video>
</template>
Enter fullscreen mode Exit fullscreen mode

Keep your app trim without effort —
kind of like Ozempic for Vue apps 😄

📦 v0.7.2 release notes

🔗 GitHub repo

Top comments (0)