formkit / auto-animate

A zero-config, drop-in animation utility that adds smooth transitions to your web app. You can use it with React, Vue, or any other JavaScript application.
https://auto-animate.formkit.com
MIT License
11.96k stars 210 forks source link

Is it possible to disable in Nuxt? #170

Open dietler opened 8 months ago

dietler commented 8 months ago

Following the logic to change the duration I tried both: v-auto-animate="{ duration: 100, enable: false }" and v-auto-animate="{ duration: 100, disable: true }" but neither of those seem to work.

I am trying to programmatically disable the auto-animate at the start of a certain function on the page and then re-enable it once that function runs. If passing in the attribute enable or disable isn't possible, is there another way to do this in Nuxt without falling back to the Vue package and using a plugin to have more control?

justin-schroeder commented 8 months ago

You cannot enable/disable animations this way (you can change the duration though).

To get the animation controller use the composable rather than the directive 👍