Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Centermode and VariableWidth not working #2358

Open
the-black-viper opened this issue Mar 19, 2024 · 1 comment
Open

Centermode and VariableWidth not working #2358

the-black-viper opened this issue Mar 19, 2024 · 1 comment

Comments

@the-black-viper
Copy link

I am currently trying to implement a slider where uncentered items are constrainted/minimized and when they are centered the full content is then shown. I managed to work this part out however on scrolling the items, the item in focus is not centered and there will be instances where it shifts to the left and to the right (usually if its on the last item).

image

My current settings are:

 <Slider
   dots={true}
   centerMode={true}
   centerPadding="60px"
   infinite={true}
   variableWidth={true}
   autoplay={false}
   slidesToShow={2}
   slidesToScroll={1}
 >

Also tried to modify these settings and it still won't center on scroll.

Here is an example sandbox of the issue Working Example

@joshuatuscan
Copy link

I created an issue around a very similar issue I am experiencing #2347

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants