0

I have used swiper in my hero section of my next.js app. And I have used server components for most of my page. The problem is swiper doesn't have placeholder for this content. So it is causing too much layout shift after loading js file. I cannot use placeholder manually since the images for swiper comes from the api dynamically and it may be no image.

I didn't find any solution in swiper.js docs. How can I use those image slider with server components not causing layout shift in hero section.

Rick Viscomi
  • 8,180
  • 4
  • 35
  • 50
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Aug 02 '23 at 19:26

0 Answers0