You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<Carousel
slides={slides}
goToSlide={goToSlide}
offsetRadius={offsetRadius}
showNavigation={false}
animationConfig={config.slow}
offsetFn={(offsetFromCenter) => {
// If offsetFromCenter is 0, the element is centered
if (offsetFromCenter === 0) {
return {
opacity: 1, // Full opacity for the central element
transform: "translateY(-50%) translateX(-50%) scale(1)",
left: "50%", // Keeps the element in the center with normal scaling
};
}
// If the offset is negative, the element is on the left; otherwise, it's on the right
const isLeft = offsetFromCenter < 0;
return {
opacity: 1, // Keeps opacity constant
transform: isLeft
? "translateY(-50%) translateX(-30%) scale(0.75)" // For elements on the left
: "translateY(-50%) translateX(-70%) scale(0.75)", // For elements on the right
};
}}
/>
No description provided.
The text was updated successfully, but these errors were encountered: