Vue-carousel: only one element slide

Created on 12 Apr 2019  路  5Comments  路  Source: SSENSE/vue-carousel

Is it possible to customize your plugin so that when switching slides only one element is added.
example
image
i want this
image

Most helpful comment

Ah I misunderstood your request, for that you'll need to add scrollPerPage=false, like this -> https://jsfiddle.net/oLvr8wem/

All 5 comments

Hey @valeriy-efimov, you can set the perPage prop to 1! https://ssense.github.io/vue-carousel/api/#perPage

@quinnlangille not working
https://jsfiddle.net/suobpda2/
if press right button, display "3 5 6" but i want to see "2 3 4" if again press "3 4 5" etc

Ah I misunderstood your request, for that you'll need to add scrollPerPage=false, like this -> https://jsfiddle.net/oLvr8wem/

@quinnlangille thank you very much!

Hi @quinnlangille while this visually works, it is not possible to target the "active" sliders this way.

When you go from "items 1-2-3" to "items 2-3-4", active classes switch from "items 1-2-3" to " items 4-5-6", so when you visually get to "items 4-5-6" you don't have any active class anymore.

image

Is there any workaround to that?

Thanks!

Was this page helpful?
0 / 5 - 0 ratings