Vertical Swiper + autoHeight
See original GitHub issueIs your feature request related to a problem? Please describe.
For many use cases, vertical sliders are the best solution. It would be a great addition to swiper if autoHeight would work for swipers with direction: 'vertical' as well.
Describe the solution you’d like
I would love to see a swiper that works just like the autoHeight mode in horizontal, it should measure the height of the current slide (or if more than one, the heighest) and adjust the wrapper height to it.
Describe alternatives you’ve considered Fixed height sliders work well with vertical mode but that is not always the best solution.
Additional context
@nolimits4web mentioned that it is only for 'horizontal', is there a reason for that?
I tried with custom css js and events to calculate the height correctly in the correct place but could not find the right event with the right code needed. The closest I could get is this codesandbox:
https://codesandbox.io/s/swiper-vertical-forked-2gklb?file=/index.html
The wrapper gets the correct height but the slide offset is wrong. A hint for a workaround would also be helpful. I nonetheless consider autoHeight + direction: vertical a very good match.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:27
- Comments:15
Top Related StackOverflow Question
It seems that this problem still exists. I recon more people want to use the
autoHeight+direction: verticalcombination. Have you found a workaround for this @niklasp? I’m still looking but when I find a solution I will let you know if you still need it 😉Same problem