Theo's Typesafe CultTTC
Theo's Typesafe Cult14mo ago
6 replies
dzenda

Help with react carousel

Hey is someone here good with react carousel libraries?
I need to accomplish something like this with the non focused cards in the carousel being stacked be under the focused one. I tried the one in shadcn but that got me nowhere.
TLDR. What do you use for Carousel? && Is this achievable ?
TY
image.png
A carousel with motion and swipe built using Embla.
Carousel
Solution
        
<div
className="relative mx-4 max-w-[1050px] flex-[0_0_80%] transition-all duration-300 ease-in-out"/>

  const [emblaRef, emblaApi] = useEmblaCarousel({
    align: 'center',
    containScroll: 'trimSnaps', //this line
  });

This is how i solved the issue
Was this page helpful?