Composable

By default, GSAP is also exported as composable useGSAP()

This allows for all cases where the directive doesnt work to just use regular GSAP from the <script> section.

You can simply use it like so:

<script setup>
onMounted(() => {
  useGSAP().to("<selector>", {
    props,
  });
});
</script>

Disabling composable

If you are experiencing issues due to other already existing imports of gsap, you can disable the auto-import of the composable in nuxt.config.ts via the composable: property See more