Change Views in Carousel by scripting

Hi,
I want to have my own button for navigating between views in the Carousel instead of the arrows or dots icon. So for this, I tried to change the "props.activePane" but this only changes the view and does NOT show the transition animations.
So I wonder if there any hidden method or tricks to do the same behavior of pressing dots or arrows

Thanks

I don't think the component honors transitions when setting the active pane via scripting.

Hi Nader. Could you provide a snippet of script code that sets-changes the activePane? I would greatly appreciate it. Thank you.

Unfortunately this issue isn't solve yet and there is no scripts to do that

Ok, thank you sir.

Man I came here with the exact same problem hoping to find a solution. I have a page setup like this:

At first I wasn’t using a carousel to change “page”, but I changed my approach to the carousel cause like you I wanted an animation for the change. Pretty sad there’s no solution yet, I wish we could somehow look at the script that the built-in dots and arrows use to change the activePane with an animation

You can use @bmusson module for this. You can use JS arrow function for swiping the view by script:

But what I find also here using any type of carousel or even create this purely in perspective, cause a lot of loads as this components need to loads all views at first to be able to add swipe animations. What I do instead is use to embedded view components and change the view myself and add fade out and fade in animations by using CSS opacity animation.

2 Likes