[Help]: Vue2 support? #842
-
SummaryHi There! I'm struggling to use this library with Vue2. We have a webpack mix, so we can globally declare packages and components, and I'd like to just import Embla there instead of in my vue component, but I just can't get it to work. Does embla even support vue2? Do i need to lower my version from latest? I can't seem to find a concrete answer online. If vue2 is not supported I could attempt to use the vanilla js implementation, thanks. If applicable, which variants of Embla Carousel are relevant to this question?
Additional informationNo response CodeSandbox exampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hi @shadowspade, Thank you for your question. Unfortunately,
Good luck! Best, |
Beta Was this translation helpful? Give feedback.
Hi @shadowspade,
Thank you for your question. Unfortunately,
embla-carousel-vue
only supportsVue 3
and up. However, as you said you can use the vanilla version and re-create the behaviour ofembla-carousel-vue
by making use of theembla-carousel-reactive-utils
utility package. You need to do this if you want it to work like embla-carousel-vue`:EmblaCarousel()
if the environment is a browser and the ref you attach to the DOM has any value.Good luck!
Best,
David