Most modern mobile touch slider with hardware accelerated transitions

Overview

Get Started | Documentation | Demos

Financial Contributors on Open Collective Build status jsDelivr Hits tree-shakeable types included

Swiper

Swiper - is the free and most modern mobile touch slider with hardware accelerated transitions and amazing native behavior. It is intended to be used in mobile websites, mobile web apps, and mobile native/hybrid apps.

Swiper is not compatible with all platforms, it is a modern touch slider which is focused only on modern apps/platforms to bring the best experience and simplicity.

Sponsors

Best online casinos for Australian players New Online Casinos in Australia (2021) - Which Sites Are Safe? Nuevos Casinos Online en España 2021 Onlinecasinohex.nl is the biggest Dutch gambling site that offers a wide range of casino games and slots as well as detailed casino guides, tips and reviews The most informative and honest casino reviews for Finnish players
#1 Aussie Gambling Guide Buy real Instagram Likes - 100% Real & Instant Likes Pay Someone to Write My Research Paper Software Development Company | CodeFirst UK Krootez - Best Place To Buy Instagram Followers, Likes & Views
Gokken in online casino’s begint bij Hollandsegokken.nl! Få bransjens beste casino bonus Exclusive £5 Deposit Bingo Bonuses - £5 Bingo Sites Your guide to the world of Canadian online gambling sites in 2021 Online Casinos Nederland - Betrouwbare NL Goksites
Online Casino Canada → Best Online Casino AnbefaltCasino.com | Guiden til de beste norske casino Friendlylikes - Order Instagram Followers, Likes, and Views Easily! Crece en Instagram, Facebook, YouTube y TikTok | AumentoSocial Website that Writes Essays for You - Paperell.com
Buy 100% Cheap SMM Services - Instagram, YouTube, Twitter Custom Paper Writing and Editing Service | Essay Writing Help easy-views.org - High Retention Youtube Views

Features

  • Tree-shakeable: Only modules you use will be imported into your app's bundle.
  • Mobile-friendly: It is intended to be used in mobile websites, mobile web apps, and mobile native/hybrid apps.
  • Library Agnostic: Swiper doesn't require any JavaScript libraries like jQuery, which makes Swiper much smaller and faster. It can be safely used with libraries such as jQuery, Zepto, jQuery Mobile, etc
  • 1:1 Touch movement: By default, Swiper provides 1:1 touch movement interaction, but this ratio can be configured through Swiper settings
  • Mutation Observer: Swiper has an option to enable Mutation Observer, with this feature Swiper will be automatically reinitialized and recalculate all required parameters if you make dynamic changes to the DOM, or in Swiper styles itself
  • Rich API: Swiper comes with a very rich API. It allows creating your own pagination, navigation buttons, parallax effects and many more
  • RTL: Swiper is the only slider that provides 100% RTL support with correct layout
  • Multi Row Slides Layout: Swiper allows a multiple row slides layout, with a few slides per column
  • Transition Effects: Fade, Flip, 3D Cube, 3D Coverflow
  • Two-way Control: Swiper may be used as controller for any number of other Swipers, and even be controlled at the same time
  • Full Navigation Control: Swiper comes with all required built-in navigation elements, such as Pagination, Navigation arrows and Scrollbar
  • Flexbox Layout: Swiper uses modern flexbox layout for slides layout, which solves a lot of problems and time with size caclulations. Such layout also allows configuring the Slides grid using pure CSS
  • Most Flexible Slides Layout Grid: Swiper has a lot of parameters on initialization to make it as flexible as possible. You can control slides per view, per column, per group, space between slides, and many more
  • Images Lazy Loading: Swiper Lazy Loading delays loading of images in inactive/invisible slides until the user swipes to them. Such feature could make the page load faster and improve Swiper performance
  • Virtual Slides: Swiper comes with Virtual Slides feature that is great when you have a lot of slides or content-heavy/image-heavy slides so it will keep just the required amount of slides in DOM
  • Loop mode
  • Autoplay
  • Keyboard control
  • Mousewheel control
  • Nested sliders
  • History navigation
  • Hash navigation
  • Breakpoints configuration
  • Accessibility (A11y)
  • And many more ...

Dist / Build

On production use files (JS and CSS) only from package/ folder, there will be the most stable versions, build/ folder is only for development purpose.

Development Build

Install all dependencies, in repo's root:


$ npm install

And build development version of Swiper:


$ npm run build:dev

The result is available in build/ folder.

Running demos:

All demos located in ./playground folder. There you will fine Core (HTML, JS), React, Vue, Svelte and Angular versions. To open demo, run:

  • Core: npm run core
  • React: npm run react
  • Vue: npm run vue
  • Svelte: npm run svelte
  • Angular: npm run angular

Production Build


$ npm run build:prod

Production version will available in package/ folder.

Contributing

All changes should be committed to src/ files only. Before you open an issue please review the contributing guideline.

Major Roadmapped Features

Contributors

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

Individuals

Comments
  • An in-range update of rollup is breaking the build 🚨

    An in-range update of rollup is breaking the build 🚨

    The devDependency rollup was updated from 1.9.2 to 1.9.3.

    🚨 View failing branch.

    This version is covered by your current version range and after updating it in your project the build failed.

    rollup is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

    Status Details
    • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

    Release Notes for v1.9.3

    2019-04-10

    Bug Fixes

    • Simplify return expressions that are evaluated before the surrounding function is bound (#2803)

    Pull Requests

    • #2803: Handle out-of-order binding of identifiers to improve tree-shaking (@lukastaegert)
    Commits

    The new version differs by 3 commits.

    • 516a06d 1.9.3
    • a5526ea Update changelog
    • c3d73ff Handle out-of-order binding of identifiers to improve tree-shaking (#2803)

    See the full diff

    FAQ and help

    There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


    Your Greenkeeper Bot :palm_tree:

    stale 
    opened by greenkeeper[bot] 88
  • [swiper/react] Custom navigation/pagination components using React refs not working/possible?

    [swiper/react] Custom navigation/pagination components using React refs not working/possible?

    • Swiper Version: 6.2.0
    • Platform/Target and Browser Versions: All

    Also posten on Stackoverflow: Swiper React | How to create custom navigation/pagination components using React refs?

    What you did

    const MySwiper = () => {
      const navigationPrevRef = React.useRef(null)
      const navigationNextRef = React.useRef(null)
    
      return (
        <Swiper
          navigation={{
            prevEl: navigationPrevRef.current,
            nextEl: navigationNextRef.current,
          }}
        >
          <SwiperSlide>slide 1</SwiperSlide>
          <SwiperSlide>slide 2</SwiperSlide>
          <div ref={navigationPrevRef} />
          <div ref={navigationNextRef} />
        </Swiper>
      )
    }
    

    Expected Behavior

    To work

    Actual Behavior

    Did not work


    SwiperJS documentation states that navigation prevEl/nextEl can either be of type "string" or "HTMLElement". Using HTML nodes allows for navigation prevEl/nextEl to be scoped to each rendered instance of MySwiper. In React this is usually done with "refs".

    const App = () => (
      <div>
        <MySwiper /> // MySwiper1
        <MySwiper /> // MySwiper2
      </div>
    )
    

    In the App example above, navigation prevEl/nextEl from "MySwiper2" should not trigger sliding of "MySwiper1", which is what would happen if one would have used string selectors like { prevEl: '.prev', nextEl: '.next' }. Obviously (if even possible within the application) one could generate unique classnames. A better solution would be to pass the HTML elements as these are already unique. Is this possible somehow with React refs?

    My current hacky workaround:

    const MySwiper = () => {
      const navigationPrevRef = React.useRef(null)
      const navigationNextRef = React.useRef(null)
    
      return (
        <Swiper
          navigation={{
            // Both prevEl & nextEl are null at render so this does not work
            prevEl: navigationPrevRef.current,
            nextEl: navigationNextRef.current,
          }}
          onSwiper={(swiper) => {
            // Delay execution for the refs to be defined
            setTimeout(() => {
              // Override prevEl & nextEl now that refs are defined
              swiper.params.navigation.prevEl = navigationPrevRef.current
              swiper.params.navigation.nextEl = navigationNextRef.current
    
              // Re-init navigation
              swiper.navigation.destroy()
              swiper.navigation.init()
              swiper.navigation.update()
            })
          }}
        >
          <SwiperSlide>slide 1</SwiperSlide>
          <SwiperSlide>slide 2</SwiperSlide>
          <div ref={navigationPrevRef} />
          <div ref={navigationNextRef} />
        </Swiper>
      )
    }
    

    Thanks in advance!

    opened by maeertin 65
  • Clicks inside Swiper not working

    Clicks inside Swiper not working

    Hi,

    I'm experiencing non-functional links, pagination and next/prev arrow link with the 3.0.4 version.

    I'm using Chrome 41.0.2272.76 m on Windows 8.1

    I'm not only having the problem on an implementation I'm trying to build, but also on the plugins landing page: http://www.idangero.us/swiper/

    If anyone know why this is happening, let me know.

    Kind regards.

    opened by SantzDesign 50
  • Next JS swiper giving Must use import to load ES Module error

    Next JS swiper giving Must use import to load ES Module error

    Check that this is really a bug

    • [X] I confirm

    Reproduction link

    https://nextjs.org/

    Bug description

    this happens when I try t recreate this example: https://codesandbox.io/s/wij5y?file=/src/App.jsx:473-942

    Screen Shot 2021-10-05 at 2 14 13 PM

    Expected Behavior

    No response

    Actual Behavior

    No response

    Swiper version

    "swiper": "^7.0.0"

    Platform/Target and Browser Versions

    chtome

    Validations

    • [X] Follow our Code of Conduct
    • [X] Read the docs.
    • [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
    • [X] Make sure this is a Swiper issue and not a framework-specific issue

    Would you like to open a PR for this bug?

    • [X] I'm willing to open a PR
    React 
    opened by jonrrivera 44
  • Webpack Production Bundling fails because of UglifyJS Error with Dom7

    Webpack Production Bundling fails because of UglifyJS Error with Dom7

    This is a (multiple allowed):

    • [x] bug

    • [ ] enhancement

    • [ ] feature-discussion (RFC)

    • Swiper Version: 4.0.1.

    • Platform/Target and Browser Versions: -

    What you did

    I have installed Swiper as normal dependency in my Project and import it to my scripts file like this import Swiper from 'swiper'; If I try to bundle it to a production ready version with webpack i get this error

    Unexpected token: name (Dom7) [./node_modules/dom7/dist/dom7.modular.js:14,0][js/vendor.a8b881e4dc98829fb5c4.js:36577,6]
    
    ERROR in js/vendor.a8b881e4dc98829fb5c4.js from UglifyJs
    Unexpected token: name (Dom7) [./node_modules/dom7/dist/dom7.modular.js:14,0][js/vendor.a8b881e4dc98829fb5c4.js:36577,6]
    

    as soon as I downgrade Swiper to version 3.4.2 everything works as expected.

    Expected Behavior

    Bundling and compression via webpack is working

    Actual Behavior

    UglifyJS throws an error because of dom7

    opened by martinherweg 36
  • feat: Angular support

    feat: Angular support

    Hi, I would be happy to contribute to swipers Angular support.
    Especially as the most popular Angular swiper library has End of life notice. This PR far away from to be ready. But many functionalities implemented, I'm trying to have the same API as React, Vue, and Svelte. There are a lot of types that were missing, I've added them, but without description (as I don't know what to write there). Also right now I'm importing everything from the build directory, as a temporary solution. Currently working on virtual slides implementation.

    I would like to know if it's welcomed and if yes I would really appreciate your help and review. I understand if you will not want to include it, I'll make from it a standalone wrapper then.

    opened by vltansky 35
  • auto detect height

    auto detect height

    Feature Request:

    Make it so the height of each slide is calculated automatically, instead of having to hard code the height inside idangerous.swiper.css.

    This would be useful for mobile/responsive layouts where the width of images within the slideshow needs to be set at 100% to fill the full width of the screen. It isn't possible to know the resultant height of the image if you're using 100% width and so it can't be set within a separate CSS file as it currently is.

    opened by Dobby89 30
  • Improve Accessibility Features

    Improve Accessibility Features

    This is a (multiple allowed):

    • [ ] bug

    • [x] enhancement

    • [ ] feature-discussion (RFC)

    • Swiper Version: v4.5.0

    • Platform/Target and Browser Versions: EVERY PLATFORM

    Expected Behavior

    The slider should implement some of the features and html structure of the w3c slider example: https://www.w3.org/TR/wai-aria-practices/examples/carousel/carousel-1/carousel-1.html The w3c example also has a list of reasons why the features and html structure they used is accessible. This would make SwiperJS a lot more accessible. Some of the accessibility enhancements can be set with options, but this as the default would help users who don't know how to make it more accessible. It would also be a good reason to use this library instead of other slider libraries, because SwiperJS would be a good option for everyone who wants to apply wcag 2.1 standards. https://www.w3.org/TR/WCAG21/

    Some of the features could only be implemented in the accessibility module, for users who don't want to use them.

    Actual Behavior

    SwiperJS is only partially accessible.

    Features to implement:

    • [x] <section> as the outer container, instead of an <div> element
    • [x] outer container has aria-roledescription="carousel"
    • [x] outer container has aria-label="Example Content" (Label can be set like the next/prev slider buttons text)
    • [x] next and previous buttons are <a>-tags
    • [x] next and previous buttons haverole="button"
    • [x] next and previous buttons has aria-controls="swiperID" (this connects with the id of the content)
    • [x] content container has id="swiperID" (this connects with the aria-attribute of the next and previous buttons)
    • [x] content container has aria-live="off" when autoplay is on and aria-live="polite" when autoplay is off
    • [x] content item has role="group"
    • [x] content item has aria-roledescription="slide"
    • [x] content item has the slide number as aria-label. Example:aria-label="1 of 6"
    • [ ] Prevent tabbing to focusable items within out-of-view slides
    • [ ] Make sure disabled controls/buttons are not focusable

    Related Issues

    The w3c example doesn't use clones, but this issue is also important to improve accessibility: https://github.com/nolimits4web/swiper/issues/2929 Maybe the improved keyboard accessiblity would also fix issues like this: https://github.com/nolimits4web/swiper/issues/2945

    feature request component: a11y help wanted 
    opened by fregiese 28
  • 3D stackable slider suggestion

    3D stackable slider suggestion

    This is a (multiple allowed):

    • [ ] bug
    • [ ] enhancement
    • [x] feature-discussion (RFC)

    Expected Behavior

    I would like to discuss new sliding effect, something like coverflow but the slides stack behind and a part of slides behind shown, will be nice if you add transparent option too for background slides

    : {
            backTransparent: 0.9,
            depth: 100,
            slideShadows : true
    }
    

    Something sliding like the following demos: http://www.jqueryscript.net/demo/Simplest-3D-Image-Carousel-Plugin-For-jQuery-Carousel-js/ http://www.jqueryscript.net/demo/Cross-browser-3D-Rotator-Plugin-For-jQuery-rollingslider-js/

    feature discussion contribution welcome help wanted 
    opened by almothafar 28
  • Wrong width until page is resized on Firefox

    Wrong width until page is resized on Firefox

    This is a (multiple allowed):

    • [x] bug

    • [ ] enhancement

    • [ ] feature-discussion (RFC)

    • Swiper Version: 3.4.2

    • Platform/Target and Browser Versions: Firefox 55.0.3 (64 bits) on MacOS Sierra 10.12.6 (16G29)

    What you did

    We use Swiper to show a list of items. We observe a strange behavior on Firefox.

    Expected Behavior

    On Chrome, it works fine : our swiper is shown with 3 elements.

    Actual Behavior

    On Firefox, on page load, only one element is displayed and stretched on the whole page width. We need to resize the page to get the right layout. When inspecting the generated HTML, we can see that the style element on the swiper-slide divs containing width and margin is not set on first load, but is set after resize. Note that the elements of the slider are loaded asynchronously.

    URL to reproduce : https://support-swiper-demo.dev.v3.aws.lead.fm Login : leadformance Pwd : password

    Open it in Chrome or Firefox. After a while you should see "Nearest locations" section above "Our Events" section. We have created 3 stores located around Rostov-on-Don so that you should see locations based on your geolocation. Please let me know if you are located elsewhere so that I can create new locations working for you.

    Screenshot on Firefox before resize (bug) https://s3-eu-west-1.amazonaws.com/swiper-demo-screenshots/Capture+d%E2%80%99e%CC%81cran+2017-09-27+a%CC%80+08.38.26.png

    Screenshot on Firefox after resize (expected result) https://s3-eu-west-1.amazonaws.com/swiper-demo-screenshots/Capture+d%E2%80%99e%CC%81cran+2017-09-27+a%CC%80+08.39.37.png

    probably bug has workaround 
    opened by loriepisicchio 27
  • Swiper 2 RC

    Swiper 2 RC

    Hi guys,

    So Swiper 2 is almost ready and while i prepare new Swiper's website i want you to test the RC version that you can find at https://github.com/nolimits4web/Swiper/tree/master/dev.

    Most of functions and logic was rewritten from scratch, in many cases it should work faster and better:)

    First of all, due to the new features, in Swiper 2 already fixed the following issues: #188, #173, #163, #162, #157, #140, #118, #111, #78

    Brand new "killer" features:)

    Auto Mode

    Now, with slidesPerView:'auto' and new internal "smart grid" you can use slides with different width (and height in vertical mode). This feature allows to build very unique interfaces.

    Centerd Slides

    Many asked this feature and now with centeredSlides:true parameter active slide will be always centered, not always the on at the left side like in Swiper 1

    Slides Offset

    With offsetPxBefore, offsetPxAfter, offsetSlidesBefore, offsetSlidesAfter you can achive slides "offset" from wrapper borders!

    IE Support

    Swiper 2 comes with extended IE support, now it works in all old IE browsers: IE7 (jQuery required), IE8, IE9 and IE10.

    DOM Animation

    Now Swiper has custom DOM animation for browsers that don't support transitions (IE7-IE9)!!! So all basics swipes will works like they should in these browsers

    Smart keyboard control

    Useful if you have few swipers per page. Now when clicking keyboard arrows swiper will be animated only if it is in the visible area of window!

    Simple images preloader

    With updateOnImagesReady:true parameter Swiper will be reinitialized automatically when all its images are loaded

    Form elements

    With releaseFormElements:true Swiper 2 automatically stops propagation of events on form elements like inputs, selects and textareas

    Auto Height

    With calculateHeight:true Swiper calcs container height depending on slides content. Useful only when you use it with images and want to make it full responsive like in #162.

    "Clickable" pagination

    With paginationClickable:true you will get to approproate slide after clicking on pagination button

    Visibility API

    Now Swiper adds "active" class to currently active slide (and pagination button) AND "visible" class to slides that currently visible in container frame! With this feature combaining with transitions you can create nice animation on swipes.

    New Scroll Container

    A bit reworking scroll container (and free mode) that comes now with almost native scrolling momentum and momentum sides bounces depending on touch-move velocity

    Slides API

    Now such methods like append, prepend, remove, insertAfter, etc. work with loop mode!

    I ask you to test it, so probably you will find some bugs or have some purposes about these new features. Please submit new Swiper 2 issues into this issue

    opened by nolimits4web 26
  • 🎄On Vacation until January 11th

    🎄On Vacation until January 11th

    Dear community, as the maintainer of this project, I have put the repository in "vacation mode" so that I can take a much needed and deserved break without worrying about tasks piling up while I recharge. I hope you can understand the need to take this action and not just "turn off notifications". Anyone who has experienced a company-wide shutdown would understand, that it's much easier to disconnect from work when everyone does at the same time.

    Know that your contributions are valuable and appreciated, so please subscribe to this issue and get notified when I'm back and ready to resume actively maintaining this project.

    opened by nolimits4web 0
  • Rounding error (?) causes `swiper.isEnd` to be incorrect and thus `.swiper-button-disabled` to not be applied

    Rounding error (?) causes `swiper.isEnd` to be incorrect and thus `.swiper-button-disabled` to not be applied

    Check that this is really a bug

    • [X] I confirm

    Reproduction link

    https://github.com/AaronBeaudoin/swiper-bug

    Bug description

    IMPORTANT: Although, I have successfully created a reproduction, this issue can only be reproduced under specific circumstances due to it being influenced by monitor DPI (or something like that). I can literally drag the browser window from one monitor to another to toggle whether the bug appears, so read the description below carefully to understand what exactly I'm seeing.

    Description

    When I open the reproduction above in my browser (it is nothing but an index.html file) on my Macbook Pro's internal display, the Swiper does not correctly detect when it has been scrolled to the end.

    The Swiper is in cssMode: true, so when I say "scrolled to the end" I mean that I've hovered my mouse over the .swiper-wrapper element and scrolled with two fingers horizontally to the end of the scrollable area inside the element.

    When I do so, the .swiper-button-next element should have gotten the .swiper-button-disabled class, because the Swiper is at the end and therefore is not able to scroll further. However, the button remains unchanged. If the button is clicked, the Swiper then correctly detects that it is at the end and toggles the class correctly.

    My Digging

    I did some digging to save you some time, or in the case that you cannot reproduce the behavior with your monitor setup. Here's what I found.

    When I add a breakpoint in core/update/updateProgress.js on line 20, the state when the Swiper has been scrolled all the way to the end is as follows:

    translate: -157.5
    swiper.minTranslate(): 0
    swiper.maxTranslate(): -157.6
    progress: 0.9993654822335025
    

    The Swiper cannot at this point be scrolled further, although from the number it seems that it should. So it seems that either some math in there is wrong, or the progress should be relaxed to consider the Swiper to be at the end if it is within 1 pixel of the "expected" end value.

    Expected Behavior

    No response

    Actual Behavior

    No response

    Swiper version

    8.4.5

    Platform/Target and Browser Versions

    macOS Chrome 108.0.5359.124 arm64

    Validations

    • [X] Follow our Code of Conduct
    • [X] Read the docs.
    • [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
    • [X] Make sure this is a Swiper issue and not a framework-specific issue

    Would you like to open a PR for this bug?

    • [ ] I'm willing to open a PR
    opened by AaronBeaudoin 2
  • spaceBetween supported value of percentage as String, but type only allow Number

    spaceBetween supported value of percentage as String, but type only allow Number

    It seems spaceBetween allow percentage as string to be enter:

    https://github.com/nolimits4web/swiper/blob/c949e85e3ec8773b223ed057b31c177f010484ba/src/core/update/updateSlides.js#L56-L58

    But spaceBetween type restricted to number or undefined:

    https://github.com/nolimits4web/swiper/blob/2bde0dab7147fefdb994d4932524cfbbb8efbef1/src/types/swiper-options.d.ts#L257-L264

    which cause some type warning, here is the warning in vue [Vue warn]: Invalid prop: type check failed for prop "spaceBetween". Expected Number with value NaN, got String with value "5%"

    opened by chunglam2525 0
  • What is the type of a swiper custom module in typescript?

    What is the type of a swiper custom module in typescript?

    Hi. Having a problem with identifying the appropriate type for a swiper module. As far as I know, a swiper module is a function that receives a single argument which is an object. Let's say I have the following code

    function customModule(argument: ModuleArg) { console.log( }
    
    const swiper = new Swiper(".swiper", {
      modules: [customModule]
    })
    

    What is the type of ModuleArg? I searched through your code base and documentation but couldn't find what I needed. for example I used Swiper type exported from swiper/types but it wasn't what was shown in log statement.
    Thanks in advance

    opened by ardalan-nhd 0
  • SwiperJS not autoplaying when only having img-tags as children (React)

    SwiperJS not autoplaying when only having img-tags as children (React)

    I am using Swiper in a React project. Problem: my slides are not autoplaying.

    Code:

    import { Swiper, SwiperSlide } from "swiper/react";
    import { Pagination, Autoplay } from "swiper";
    
    import "swiper/css";
    import "swiper/css/pagination";
    import "swiper/css/autoplay";
    
    import MyImage1 from "../pathToImage";
    import MyImage2 from "../pathToImage";
    import MyImage3 from "../pathToImage";
    
    export default function Home() {
      <div className="swiper-container">
        <Swiper
          modules={[Autoplay, Pagination]}
          pagination={{ clickable: true }}
          spaceBetween={50}
          slidesPerView={1}
          autoHeight={true}
          loop={true}
          autoplay={true}
        >
          <SwiperSlide>
            <img src={MyImage1} />
          </SwiperSlide>
          <SwiperSlide>
            <img src={MyImage2} />
          </SwiperSlide>
          <SwiperSlide>
            <img src={MyImage3} />
          </SwiperSlide>
        </Swiper>
      </div>;
    }
    

    The strange thing is: when I add a new SwiperSlide-tag with just some text inside, the slides do start autoplaying:

    <Swiper ...options... >
          <SwiperSlide>
            <img src={MyImage1} />
          </SwiperSlide>
          <SwiperSlide>some text</SwiperSlide>
          <SwiperSlide>
            <img src={MyImage2} />
          </SwiperSlide>
          <SwiperSlide>
            <img src={MyImage3} />
          </SwiperSlide>
    </Swiper>
    

    Is this a bug or am I doing something wrong? Versions: "swiper": "^8.4.5" "react": "^18.2.0",

    opened by ArnaudVerpouckeDeveloper 2
  • Last bullet navigation is never active when centeredSlides and centeredSlidesBounds are true

    Last bullet navigation is never active when centeredSlides and centeredSlidesBounds are true

    Code language and versions

    Svelte version: 3.0.0 Vite version 4.0.2 Typescript version 4.9.4 Swiper version 8.4.5 Node version 16.15.1

    Description

    I think there are a bug when using the combination of centeredSlides={true}, centeredSlidesBounds={true} and setting slidesPerView to a decimal number (2.2, 3.2 etc.). When navigating the second and the last bullet they are not marked as active. I guess it has something to do with the centered slide is the active one.

    How to reproduce

    1. Copy the code below into a svelte project with everything needed installed
    2. Try using the navigation, either swipe or use the arrows, and see that the second and last is not set as active

    Code:

    <script lang="ts">
     // import Swiper JS
     import { Swiper, SwiperSlide } from "swiper/svelte";  // import Swiper styles
     import { Navigation, Pagination } from "swiper";
     // import the default css for swiper
     import 'swiper/css';
     import 'swiper/css/navigation';
     import 'swiper/css/pagination';
    </script>
    
    <div>
     <Swiper 
         pagination={true}
         modules={[Pagination, Navigation]} 
         navigation={true} 
         class="mySwiper" 
         slidesPerView={3.2}
         spaceBetween={20} 
         centeredSlides={true}
         centeredSlidesBounds={true}>
           <SwiperSlide>
               slide 1
           </SwiperSlide>
           <SwiperSlide>
               slide 2
           </SwiperSlide>
           <SwiperSlide>
               slide 3
           </SwiperSlide>
           <SwiperSlide>
               slide 4
           </SwiperSlide>
           <SwiperSlide>
               slide 5
           </SwiperSlide>
           <SwiperSlide>
               slide 6
           </SwiperSlide>
           <SwiperSlide>
               slide 7
           </SwiperSlide>
           <SwiperSlide>
               slide 8
           </SwiperSlide>
       </Swiper>
    </div>
    
    opened by emely-webit 0
Releases(v8.4.4)
Owner
Vladimir Kharlampidi
Front-end engineer. Creator of Framework7 and Swiper
Vladimir Kharlampidi
Atropos - Stunning touch-friendly 3D parallax hover effects

Atropos Atropos is a lightweight, free and open-source JavaScript library to create stunning touch-friendly 3D parallax hover effects. Available for J

Vladimir Kharlampidi 2.3k Jan 5, 2023
BootstrapVue provides one of the most comprehensive implementations of Bootstrap v4 for Vue.js. With extensive and automated WAI-ARIA accessibility markup.

With more than 85 components, over 45 available plugins, several directives, and 1000+ icons, BootstrapVue provides one of the most comprehensive impl

BootstrapVue 14.2k Jan 4, 2023
The most extensible TerminalStartpage you will ever find.

Termst Make the startpage more than just the first page you load up. The most extensible Terminal startpage you will ever find. This project exists to

EvadingEvasions 15 Jun 27, 2022
⚡️ Integrate Nuxt with Twind, The smallest, fastest, most feature complete tailwind-in-js solution in existence!

Nuxt Twind Module Integrate Nuxt with Twind, The smallest, fastest, most feature complete tailwind-in-js solution in existence! Warning ?? This module

pooya parsa 38 Oct 18, 2022
Mobile UI Components based on Vue & WeUI

Be Cool with Vue@^2.3.0 and WeUI. Live Demo >> Sponsors 我们的产品 Requirements 暂未适配 [email protected],请注意。 vue@^2.3.0(for .sync modifier) webpack@^2.0 node@^7.6

Airyland 17.6k Dec 28, 2022
Lightweight Mobile UI Components built on Vue

Vant Mobile UI Components built on Vue ?? 文档网站(国内) ?? 文档网站(GitHub) ???? 中文版介绍 Features 65+ Reusable components 1kb Component average size (min+gzip) 9

有赞 20.7k Dec 31, 2022
Mobile UI elements for Vue.js

Mint UI Mobile UI elements for Vue 2.0 Homepage Documentation Installation npm i mint-ui -S # for Vue 1.x npm i mint-ui@1 -S Usage Import all compone

饿了么前端 16.5k Jan 8, 2023
:large_orange_diamond: A fantastic mobile ui lib implement by Vue

cube-ui A fantastic mobile ui lib implement by Vue. Links Home Docs Example Application Guide Communication New cube-ui project ? Recommend use the CL

DiDi 9k Jan 2, 2023
Vue Native is a framework to build cross platform native mobile apps using JavaScript

Vue Native Visit our website at vue-native.io or read the official documentation here. Build native mobile apps using Vue Vue Native is a framework to

GeekyAnts 8.4k Jan 6, 2023
Mobile UI Components, based on Vue.js and ionic CSS

Mobile UI Components, based on Vue.js and ionic CSS

王大虎 3.4k Dec 23, 2022
Wiki.js | A modern and powerful wiki app built on Node.js

A modern, lightweight and powerful wiki app built on NodeJS Official Website Documentation Requirements Installation Demo Change Log Feature Requests

requarks.io 19.5k Jan 5, 2023
Modern ThreeJS boilerplate powered by Vite & Typescript

Modern ThreeJS ⚡️ Modern ThreeJS boilerplate powered by Vite & Typescript. Features Powered with Vite ?? GUI controls using Tweakpane ?? Typescript ??

Alvaro Saburido 64 Jan 4, 2023
Admin UI Template is a modern, responsive, and customizable admin UI template for your business.

Admin UI Template is a modern, responsive, and customizable admin UI template for your business. It contains reusable components, theme color, and design support along with dark theme support.

Open Template Hub 7 Dec 18, 2022
⊞ The modern way to work with tables. Blazing fast facet-filtering, sorting, and searching.

Table Elements The easiest way to integrate Meilisearch into your frontend as a data source for your tables. These components will allow you to kick-s

Open Web 10 Nov 21, 2022
Modern Vue Stack 2022. Joyful development experience 🎉

Modern Vue Modern Vue stack 2022 with Micro front end & Monorepo ?? . Joyful development experience ?? . The main branch will keep clean for quickly c

han 263 Dec 18, 2022
100 Modern CSS Buttons, Free And Royalty Free.

?? Contributions Currently, there are 100 buttons in this project, but we’d love to have more! If you have new button ideas, create an Issue. If you h

null 2.7k Jan 7, 2023
A modern, zero-dependency uptime monitoring tool & status page based on GitHub Actions & Nuxt Content v2.

StatusBase Uptime monitoring tool & beautiful status pages Powered by Nuxt Content v2! Free • Open Source • Notification View Demo · Report Bug · Requ

zernonia 208 Dec 27, 2022
A modern, zero-dependency uptime monitoring tool & status page based on GitHub Actions & Nuxt Content v2.

StatusBase Uptime monitoring tool & beautiful status pages Powered by Nuxt Content v2! Free • Open Source • Notification View Demo · Report Bug · Requ

StatusBase 194 Jul 5, 2022