Questions tagged [swiper.js]

Swiper is a versatile mobile touch slider that provides seamless transitions and authentic behavior, all while being completely free. This dynamic tool was designed for utilization in mobile websites, mobile web apps, as well as native or hybrid mobile applications.

The Swiper grid functionality is failing to function properly

For the past two days, I've been struggling to successfully implement a Swiper Grid feature in my Next.js application. Despite trying various solutions from stackoverflow and experimenting with different approaches, none of them have resulted in the d ...

Is Swiper carousel navigation secretly operating without being seen?

I've got a website that utilizes the Swiper carousel from SwiperJS, find it here: An issue I am facing is that the navigation elements are invisible but functional, with the pagination feature unaffected. This peculiar behavior is observed only in Safari ...

Is it possible to programmatically disable and enable the autoPlay feature in SwipperJS?

Is there a way to have an autoplay feature in Swipper only if the number of items in the array is greater than 5? I have multiple arrays with varying lengths and want to display them in Swipper. ...

After refreshing the page in Next JS, there is a delay in loading the Swiper Js styles. The Swiper slides appear stretched while waiting for Next JS to load the styles. Any suggestions

Having an issue with my Next 14.0.3 app and tailwind CSS. I recently installed swiper JS version 11.0.5 using npm. The problem arises when I reload the page, it takes about 1 or 2 seconds for the swiper styles to load. During this time, the swiper slides s ...

Unique bullets for page navigation in Swiper.js/react

I've been attempting to implement custom paginations for my component in order to have bullets outside the container, but unfortunately they are not showing up in the DOM. Below is the code snippet of the component: export function CommentSlider({ comment ...

I've encountered some issues with importing pagination from modules after installing SwiperJs

Having some issues with importing pagination from modules in SwiperJs for my nextjs project. The error message "Module not found: Package path ./modules is not exported from package" keeps popping up. I have tried updating the module to the latest version ...

The navigation buttons of Swiper.js mysteriously vanish when in production mode

Issue with Swiper.js Navigation Buttons vanishing in production mode While the Swiper.Js navigation buttons are visible during development, they seem to disappear in the production environment. Configuration file: next.config.js const withSass = require( ...

Discover the steps for retrieving the <div> element using the swiper API

Link to my page: Click here Design reference: View design The design requires flexing the 2 arrow buttons, but these elements are missing in the code(source: autoplay swiper). How can I align them to the right-bottom corner? <div class="flex" ...

Issue with SwiperJS not completely filling the height of a div

My issue relates to using swiperJS with multiple images, as I'm struggling to make it take the full width and height of the containing div. Despite applying styling like this to my images: .swiper-slide img { width: 100%; height: 1 ...

There was a TypeError encountered while attempting to read the 'useState' properties of null for the swiper and next.js 13 modules

We recently updated to next.js 13 and encountered the following error message: TypeError: Cannot read properties of null (reading 'useState') The error stack trace is displayed below: Warning: Invalid hook call. Hooks can only be called inside ...

Is the latest Swiper JS version compatible with outdated web browsers?

Seeking information on browser compatibility. I am interested in upgrading to the latest version 8.4.5 of Swiper JS for my project, currently using version 4.1.6. Upon examining their shared Github repository file .browserslistrc, I noticed changes that ta ...

Angular SwiperJs integration: smoothly move three slides with a single click

I am currently utilizing the SwiperJs library in conjunction with Angular. I am interested in adding a feature where clicking will navigate to the next (or previous) 3 slides instead of just 1 slide. The regular arrows function correctly, with this code ...

Encountering Thumbnail Type Error While Implementing Swiper in Next.js

When trying to integrate Swiper with Next.js, I ran into an issue concerning thumbnails. "onSwiper={setThumbsSwiper}" This line is causing a TypeScript error: swiper-react.d.ts(23, 3): The expected type comes from property 'onSwiper' w ...

Implementing dual-finger vertical swipe functionality in Swiper JS

Does anyone know of a way to enable two-finger swipe on a Vertical Swiper? I attempted to retrieve the object from swiper.touches, but it didn't provide me with the number of fingers used during swiping as described in the documentation. https://dev ...

Shifting the pagination outside of the slider in ReactJS and SwiperJS seems to be tricky. Despite trying to adjust the margins and padding, the pagination

I've been struggling with this issue for a while now. I need to move the pagination outside of the slider, but using padding or margin doesn't seem to work. It always remains inside the slider, and if I try to position it outside, it gets hidden. ...

Swiper JS eternal carousel transition

While trying to create an endless carousel using swiper js on my website, I encountered a slight vibration between the slides that makes it seem like the images are flickering. Despite my efforts, I have been unable to find a solution to this issue. Any as ...

Issue with locating module 'swiper_angular' during Jest unit testing following upgrade from Swiper 6 to 7

Encountering an issue with my unit tests post upgrading from Swiper 6 to 7. My setup includes Angular 12 and Swiper 7.3.1. The unit tests were functioning properly before the upgrade (Swiper version 6.5.9). Incorporating the SwiperModule in my tests like ...

Tips for avoiding the automatic transition to the next slide in SwiperJS

How can I prevent the next button click in swiper based on my custom logic? I am using the swiperjs library within a Vue project and I need to stop users from swiping or clicking the next button to move to the next slide depending on certain conditions de ...

Design your own arrow Slideshow + Next.js + Sass styling

In my current project, I am utilizing the swiper slider within a Next.JS development environment and styling with Sass. However, despite following the documentation guidelines to apply custom styles to the slider arrows, they do not display correctly. My ...

Creating personalized Stop and Play controls for Swiper.js Autoplay feature in a React/Next project

My quest to create a Swiper in React with autoplay functionality using Swiper.js has been quite a challenge. Despite following the instructions diligently and researching extensively, I couldn't find a solution. I even tried referencing a jQuery example th ...

Customize Swiper js: How to adjust the Gap Size Between Slides using rem, em, or %?

Is there a way to adjust the spacing between slides in Swiper js using relative units such as 2rem? The entire page is designed with relative units. All measurements are set in rem, which adjusts based on the viewport size for optimal adaptability. For i ...

Creating a vertical swiper in React is a simple task that can be accomplished by adjusting

I am looking to create a homepage where I can swipe through one post at a time in mobile view. I have experimented with React Swiper, but it only allows horizontal swiping of posts. I would like to swipe posts vertically instead. Any suggestions on how t ...

Managing two separate instances with swiper.js

Currently, I have set up two instances of swiper.js and I am looking to scroll both while interacting with just one of them. Update: My primary objective is to replicate the core functionality seen on the swiper homepage. Update 2: I came across this lin ...

What is the best way to utilize React in order to assign a random background according to each element's id for numerous elements?

Currently, I have integrated a Swiper component into my React application. The Swiper consists of n slides, with each slide requiring a set of m images to be randomly selected as the background upon loading. Prior to transitioning to React, I had devised ...

Setting up Swiper in a ReactJS environment

I've been trying to incorporate Swiper for a slider in my React application, but it's not behaving as expected. Here's what I did: npm install Swiper Then I imported Swiper in the componentDidMount method of my component like this: import Swiper from 's ...

Stop Swiper Slide from moving when clicked on

I am currently utilizing Swiper JS and have encountered an issue. In my Swiper slider, each slide contains a button. Whenever I click on the slide or the button itself, the slide becomes the active one, causing the entire slider to move. Is there a way to ...

vue-awesome-swiper / The button's name is synchronized, causing all other swiper elements to move in unison

<template> <swiper v-for="item in items" :key="item.id" :options="swiperOption" ref="mySwiper" @someSwiperEvent="callback"> <swiper-slide>I'm Slide 1</swiper-slide> <swiper-slide>I'm Slide 2</swiper-slide> ...

The Swiper library is incompatible with the "vue" version "^2.6.11" and cannot be used together

I've been attempting to incorporate Swiper with "vue": "^2.6.11", however I keep encountering runtime errors. Despite following the instructions on , and modifying the imports as advised: // Import Swiper Vue.js components import { Swip ...

The Swiper example is not compatible with the default settings of Next 13

Swiper is not compatible with Next 13. Using the default React example of Swiper + 'use client' at the top of the page does not yield the expected results. To replicate the issue, follow these steps: Create a bare-bones Next 13 app using this command: ...