FilamentF
Filament15mo ago
Nuxnux

Integrate swiperjs in a custom column

Hey, the goal is to create a custom column like on this https://www.immoscout24.ch/fr/immobilier/louer/lieu-geneve
i have some problem with the integration of swiperjs https://swiperjs.com/swiper-api
from what i have understand and what i have done
npm install swiper
and in app.js i add
import Swiper from 'swiper';
import { Navigation, Pagination } from 'swiper/modules';
// import Swiper and modules styles
import 'swiper/css';
import 'swiper/css/navigation';
import 'swiper/css/pagination';
window.Swiper = Swiper;


but in my custom column impossible to create a new instance i always have Swiper not defined
@script
<script>
const swiper = new Swiper('.swiper');
</script>
@script
Louer bien immobilier Genève: Trouvez le bien immobilier qui correspond à vos désirs sur ImmoScout24 - La plateforme de l'immobilier en Suisse.
Swiper
Swiper is the most modern free mobile touch slider with hardware accelerated transitions and amazing native behavior.
Was this page helpful?