surmon-china / vue-awesome-swiper

🏆 Swiper component for @vuejs
https://github.surmon.me/vue-awesome-swiper
MIT License
12.83k stars 1.96k forks source link

Dynamic width slides with images #271

Open pschaub opened 6 years ago

pschaub commented 6 years ago

How can I use slides that have a dynamic width based on the image in the slide itself? I want to have e.g. 5 slides, all images have the same aspect ratio. The slider should be 200px height. I want to see as much slides as possible (responsive) - not a fixed amount of slides.

I don't know how to do this with Swiper4, any idea?

My issues are the "not a fixed amount of slides" and "dynamic width".

I want to do something like this: https://owlcarousel2.github.io/OwlCarousel2/demos/autowidth.html (but with "centered" instead of "left"-aligned if possible)

yerinho commented 6 years ago

Anyone have a solution for this? I need it too, thanks.

surmon-china commented 6 years ago

@yerinho swiper.update()

nataliawww commented 5 years ago

+1

DespertaWeb commented 4 years ago

+1! I think I needing something similar: I need to set fixed width for the images in each slide, from my styles with some mediaqueries. Any ideas?

JorgeMantillaHernandez commented 4 years ago

+1! I think I needing something similar: I need to set fixed width for the images in each slide, from my styles with some mediaqueries. Any ideas?

Do you have any solution? thanks

DespertaWeb commented 4 years ago

@JorsMantilla Sorry I don't recall the solution we came up with, and I no longer work at the company we coded that implementation, so I can't check it out. :(

AndrewBogdanovTSS commented 4 years ago

@JorsMantilla @pschaub https://codesandbox.io/s/nuxt-vue-awesome-swiper-v223m?file=/components/Swiper.vue