vueuse / motion

🤹 Vue Composables putting your components in motion
https://motion.vueuse.org
MIT License
2.37k stars 82 forks source link

Custom directives/presets do not work for Motion components #201

Closed emavitta closed 2 months ago

emavitta commented 5 months ago

I'm trying to understand if i'm doing something wrong, although everything works.

I'm not using the preset prop on the Motion component, instead i'm using the v-motiondirective. This way i can also use custom directive.

Why specify in the docs the use of the preset and not the v-motion directive? Is it wrong to do it? If so how can i add a custom directive?

BobbieGoede commented 5 months ago

I'm not sure I understand the question, the <Motion> component serves the same purpose as v-motion. Are you using the directive on a Motion component? If so, this is untested and I would suggest using only the component or the directive approach, not both at once, simply cause I don't know if this has any unexpected behavior.

The component usage is still relatively new, you're right that custom presets are currently not working when passed using the preset prop, I will look into fixing this soon!

emavitta commented 5 months ago

yep, that's right; it works using directives but i may have found some bugs (or my code is just bad, still haven't figured it out).