I am currently working on a carousel where the center slide needs to expand to display additional content. I have set up a working example in this codesandbox. The main criteria for this project are:
- Non-centered slides will be minimized to show only the image.
- The centered slide should expand to reveal text content.
- Depending on the screen size, the visible slides will adjust dynamically with partially visible slides at the boundaries.
Upon initial render, everything looks good. However, when transitioning to the next/previous slide, it seems to shift to the left and occasionally move randomly to the right. The transition is not smooth as it shifts left before abruptly re-centering. I have tried adjusting the observer
and related parameters, along with adding CSS to the active slide, but have not been able to resolve the issue.
Currently, the layout appears like this: https://i.sstatic.net/43SP9.png