Replies: 4 comments
-
Did you find any solution for this?? |
Beta Was this translation helpful? Give feedback.
-
Did you find a solution? I'm running into the same problem. |
Beta Was this translation helpful? Give feedback.
-
na man, no solution so far, its kinda weird though, checked all their
documentation still no solution, i started using slick , gets the job done
… Message ID: <nolimits4web/swiper/repo-discussions/6810/comments/11981936@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
I figured it out in the meantime. You need to calculate the width of the slides yourself and add it to your website as critical CSS. Example:
Not the best solution but it gets the job done. |
Beta Was this translation helpful? Give feedback.
-
Hi All,
Trying to figure out this issue actually but no luck so far.
Im using nextjs 13.4 (App router)
Swiper is working but on page load, it stretches the first slide for couple of seconds, and then loads all the other slides.
I can import the carousal dynamically with dynamic imports, but that's something i don't really want.
Is there a way to load swiper/carousal as soon as the page loads without any layout shift?
heres my code:
`
"use client";
import React from 'react';
import { Swiper, SwiperSlide } from "swiper/react";
import Data from '../../data/class';
import { Autoplay } from 'swiper';
import ClassIcons from './ClassIcons';
const SearchByClass = () => {
const dataComp = Data.map((data, index) => {
return (
<ClassIcons
{...data}
key={data.id}
class={data.title}
cars={data.cars}
icon={data.icon}
/>
);
}
);
return (
};
export default SearchByClass;
;
`
Beta Was this translation helpful? Give feedback.
All reactions