Adding GSAP Plugins

If you want to add your own GSAP Plugins (like EasePack, PhysicsPropsPlugin, etc) you can do so by registering them with the composable useGSAP().

Since it shares the actual gsap instance from the module, plugins only need to be registered once - preferably as high in the app structure as needed.

app.vue
<script setup>
import { RoughEase } from 'gsap/EasePack'

onBeforeMount(() => {
  useGSAP().registerPlugin(RoughEase)
})
</script>

The following plugins are imported by default as part of the modules featureset and therefore are not needed to import manually:

  • ScrollTrigger
  • ScrollToPlugin
  • Draggable
  • TextPlugin