slidesEl
, slidesGrid
, and slidesSizesGrid
(#7768) (fb59a41)scrollOnFocus
(#7632) (f4f7da0)slidesUpdated
event (8a0c7c4)loopAddBlankSlides
parameter (b5db223)loopedSlides
parameter, add loopAdditionalSlides
parameter (d647985)eventPrefix
parameter default to swiper
(88d463a)hidden
(88941a8)realIndexChange
on initialIndex if runCallbacksOnInit is disalbed (48c4e0a), closes #6976slideToClickedSlide
when using Element slide slots (af0519c), closes #6958hashchange
event (106a3d7), closes #6943{enabled: true}
(abf8405)contextmenu
event (721ccaf), closes #6692part
when added dynamically (db5b5d6), closes #6899isElement
on swiper-containers only (#6870) (2f61fda)releaseOnEdges
for freeMode (8a83360), closes #6770 #6799<style>
tag if adopted stylesheet are not supported (18613df).esm.js
to .mjs
(7a17821)<div class="swiper">
inside<div class="swiper">
insidecenteredSlidesBounds
(93b4279), closes #6689swiperSlideSize
in hidden slider (36ef2e6), closes #6718allowSlideNext
in RTL mode (d61da52), closes #6737part="bullet[-active]"
to pagination bullets (8b4cccd), closes #6717smoothScroll
check in Support module (e0f4ae4)injectStylesUrls
(6a50d45), closes #6662string
type for effect
param (7340629), closes #6676noMousewheelClass
param (0fcd210)swiper-no-mousewheel
ignore class (#6671) (c9130c3)SwiperClass
type from 'swiper/react' (6768efe), closes #5500%
(446af7e), closes #6647connected
(5a5ebb4)%
(446af7e), closes #6647connected
(5a5ebb4)injectStyles
to be acceptable as props (7c1c5d3), closes #6578null
type (3177936), closes #6505slideActiveClass
(#6495) (756ecdb)+
char in pagination classes (d0beb9f), closes #6486eventsPrefix
prop to avoid collision with native events (d5df91f), closes #6450on
event handlers (898f76c), closes #6399window.SwiperElementRegisterParams
method to register acceptable element props (fb63358)spaceBetween
can also be a string (446fb06), closes #6286autoplayTimeLeft
event (8467397), closes #6333document
(9cee290), closes #6318oneWayMovement
parameterpreloadImages
, updateOnImagesReady
parameterscontroller.control
parameter also accepts HTMLElement or CSS string with the selector of swiper to controlrotate
thumbs.swiper
parameter also accepts HTMLElement or CSS string with the selector of thumbs swiperswiper.zoom.in(ratio)
method now accepts custom zoom ratiowrapperClass
to swiper-wrapper in React & Vue components (7aaa0d1), closes #6254 #5942loopPreventsSliding
parameter (6533890)oneWayMovement
parameter (ce2ea7f)in
method now accepts custom zoom ratio (d88df61), closes #5527renderSlide
to support slide outer HTML and HTML element (fdcd644)autoplay-delay
(8161c57)slide*DuplicateClass
parameters (8007e1a)postinstall
script (12255cf)threshold
parameter default to 5
(dfce8a3)lazy
prop to SwiperSlide to render lazy prelaoder (f5d137f)lazy
prop to SwiperSlide to render lazy prelaoder (e36b580)popstate
on init (483534f).jsx
(d7f7f65)beforeSlideChangeStart
event routing (0e8a8b8), closes #5913perSlideRotate
and perSlideOffset
parameters (db08a70), closes #5939loopedSlidesLimit
parameter to re-duplicate slides (1afa4b8)focus
handling (8a3dfee), closes #5905changeLanguageDirection
method to change it to RTL/LTR after init (f5bb7af), closes #3279navigationPrev
and navigationNext
events (d0c6365), closes #5832autoplay.delay = 0
" (d942e83)0
autoplay delay" (56e050b)enabled
prop (af9ed85)0
autoplay delay (61db26f)autoplay.delay = 0
(81a4cc8)loadPrevNext
fix when slidesPerView
is fractional (94d4c9e), closes #5712snapIndex
and snapGrid
props (ee3d2dc), closes #5733opacity: 0
styles for hidden navigation buttons (85f72f4)--swiper-cube-translate-z
CSS property on swiper-wrapper (758ad28)id
parameter (213c8fe), closes #5586[ngClass]
in swiperSlide (#5562) (5d4ffdc)rotate
parameter (5f4ca8a), closes #5575slide
(2dae84f)useSwiper
context value (#5421) (60cbe75)aria-disabled
on lock/unlock (8183466), closes #5383[@output](https://github.com/output)
events emitting (#5225) (a34eb7a)allowTouchMove: false
(f0eac04), closes #5358<select>
element (faeb14a), closes #5268controller.control
on control
prop array change (7c53de8), closes #5368swiperSlide
slot data with context (89f14ab)Dom7Array
(#5405) (d248a14)Tab
) in inactive slides (1288271), closes #3149strict
(#5231) (23ee4b3)autoplayPause
and autoplayResume
events (aea56ed)useSwiper
and useSwiperSlide
context hooks (#5364) (18bb89b)swiper
and swiperSlide
context (#5391) (b5c2d3b)rewind
functionality with Virtual slides (e52de28)useSwiper
and useSwiperSlide
context hooks (987a32e)maxBackfaceHiddenSlides
param to prevent flicker in Safari (d679a98)maxBackfaceHiddenSlides
param to prevent flicker in Safari (8c05e6d)virtualData
(682f56f)swiper
and swiperSlide
context (#5377) (f3145b1)rewind
description (83574e1)loop
enabled (3d377c2), closes #5304aria-current
to current bullet (#5258) (b5df68e)progressMultipler
-> progressMultiplier
(#5158) (815e837)swiperRef
not required in SwiperSlide vue component (#4992) (1cd6af8)[(index)]
and setIndex()
(#4951) (7ee3d58)cards
effect (#4950) (c18aa08)modules
shouldn't extend prototype (f07d43f), closes #4928initNavEl()
method (#4884) (2987700)slidesPerView
switches to auto (2c8784b), closes #4881.start()
method (dda14bc), closes #4865swiper-zoom-container
(a4e351f), closes #4847watchOverflow
from unlocking slidePrev/Next (f1b7397)centeredSlides
(91f2f2f)modules
prop (596e2a1)modules
parameter (0d599e2)shadowPerProgress
parameter (980c4c7)progressMultiplier
option (ed3bd7a)swiper-container
class to swiper
(ad8002c)swiper-container
class to swiper
(c763c9c)watchOverflow
is now enabled by default (b97286f)watchOverflow
detection (627ae4c)limitProgress
and perspective
options (1c7d49e)slidesPerGroupAuto
feature (2b6f133), closes #4168centeredSlides
in CSS Mode (c940953)watchSlidesProgress
and watchSlidesVisibility
merged into single watchSlidesProgress
(33dbf62)isEdge
browser detection (9c9970c)slidesPerColumn
functionality to new Grid module (0f1df44)touchEventsTarget
is now default to wrapper
(71ffcb5), closes #4751 #3816mouse
events listeners in favor of pointer events (b9254ab)resizeObserver
is not enabled by default (552a7ea)type: module
(e8d89f2)swiper/types
!
in classes (0cfbc53), closes #4812focusableElements
prop type (7f1b1b9), closes #4822slidesPerColumn
breakpoint (c94a115), closes #4044HTMLElement
(close #4787) (#4788) (ca4f6b8)module
component prop (#4768) (ddaa069), closes #4767class
on wrapper element (1285195), closes #4679slidesPerColum
changed (1ced4f7), closes #4658enabled
prop (76dd086), closes #4633wrapperClass
to be multiple classes (0d578b0), closes #4680focusableElements
configurable (6ff0866), closes #4677window.matchMedia
to detect window width for breakpoints (1a4afe0), closes #4682createElements: true
parameter (#4507) (aef2865)disableOnInteraction
and pauseOnMouseEnter
, it will stop autoplay on interaction (e7e5031), closes #4598pauseOnMouseEnter
parameter to pause autoplay on mouse enter over container (1a10247), closes #4482<swiper>
component (66c5a55)a11y.slideRole
parameter for custom slide role (097109f), closes #4435root
parameter to avoid issues with root path detection (e6d1202), closes #3205React.StrictMode
swiper.setProgress
method to set whole Swiper translate progress (from 0 to 1)aria-roledescription
attribute name (1b73c3b), closes #4371getComputedStyle
helper (9698e58), closes #4337disabled
prop on nav element if it is a <button>
element (7536fbd), closes #4312false
#4181 (ffedb6b)scrollbar.el
will throw an error on destroyzoom
prop on slides, e.g. <ng-template swiperSlide [zoom]="true">
pagination.el
edgeSwipeDetection
parameter now can receive string 'prevent'
to prevent system swipe-back navigationslidesPerView
last slide never received "active" class/statepostinstall
scriptpostinstall
script.css
files are also available for all components.svelte
files in package[config]
support to pass all Swiper params as single object (https://github.com/nolimits4web/swiper/commit/f7d21c5f49860fdca62a31ccb62b01a790fd0df3)(index)
active slide binding (https://github.com/nolimits4web/swiper/commit/86670bd7c1b95268919147662383804e664011a7)6.4.0
.svelte
componentsslideTo
's index
parameterMaximum recursive updates
Core
Core
containerMessage
, containerRoleDescriptionMessage
and itemRoleDescriptionMessage
(#3834 thanks to @jenemde)React
SwiperSlide
component requires unique virtualIndex
to be set so Swiper can know which slide is rendered exactlyVue
SwiperSlide
was not rendered if used with v-for
SwiperSlide
component requires unique virtualIndex
to be set so Swiper can know which slide is rendered exactlyAll new Swiper Svelte components:
<Swiper spaceBetween="{50}" slidesPerView="{3}">
<SwiperSlide>Slide 1</SwiperSlide>
<SwiperSlide>Slide 2</SwiperSlide>
...
</Swiper>
<script>
import { Swiper, SwiperSlide } from 'swiper/svelte';
</script>
All new Swiper Vue.js (v3) components:
<template>
<swiper :space-between="50" :slides-per-view="3">
<swiper-slide>Slide 1</swiper-slide>
<swiper-slide>Slide 2</swiper-slide>
...
</swiper>
</template>
<script>
import { Swiper, SwiperSlide } from 'swiper/vue';
export default {
components: {
Swiper,
SwiperSlide,
},
};
</script>
useLayoutEffect
warning in Next.jsthresholdDelta
and thresholdTime
(#3720).less
files (#3724)sideEffects
causing some bundlers to not include imported styles (#3708)SwiperSlide
accepts render function with isActive
, isVisible
, isPrev
, isNext
, isDuplicate
props:
<Swiper>
<SwiperSlide>
{({ isActive }) => <div>Current slide is {isActive ? 'active' : 'not active'}</div>}
</SwiperSlide>
<SwiperSlide>...</SwiperSlide>
...
</Swiper>
__proto__
setters/getterspagination.el
, scrollbar.el
, navigation.nextEl
and navigation.prevEl
are passed from later-available refsCore
$colors
var in Navigation and PaginationReact
New NPM package structure
All scripts transpiled to ES5
New and renamed files (BREAKING CHANGE):
swiper.less
- core Swiper LESSswiper.scss
- core Swiper SCSSswiper-bundle.css
- Swiper bundle CSSswiper-bundle.js
- Swiper bundle JavaScript in UMD formatswiper-bundle.cjs.js
- Swiper bundle JavaScript in CommonJS formatswiper-bundle.esm.js
- Swiper bundle JavaScript in ESM formatswiper.cjs.js
- Swiper core JavaScript in CommonJS formatswiper.esm.js
- Swiper core JavaScript in ESM formatFollowing imports are now available
import Swiper from 'swiper'
- imports core versionimport Swiper from 'swiper/bundle'
- imports bundle versionimport Swiper from 'swiper/core'
- imports core versionComponents can be imported from core version using named imports, or using direct import:
import { Navigation } from 'swiper';
// or
import Navigation from 'swiper/components/navigation';
// and styles (Less or SCSS only)
import 'swiper/components/navigation/navigation.less';
Full server-side rendering support (SSR) with new parameters:
userAgent
- device user agent, required for some initial detectionurl
- required to correctly detect and set initial slide if Hash Navigation or History modules are usedNew loopPreventsSlide
boolean parameter (by default enabled), that prevents slidePrev/Next transitions while transition is in progress
Full support for Node.js DOM libraries like JSDOM and Domino
Added new onAny(callback)
listener to listen for any swiper event
All events now emit swiper
instance as a first argument (BREAKING CHANGE)
Added official TypeScript definitions
Updated to use next generation dom7
and ssr-window
libraries
All new Swiper React components:
import { Swiper, SwiperSlide } from 'swiper/react';
export default () => {
return (
<Swiper
spaceBetween={50}
slidesPerView={3}
onSwiper={(swiper) => console.log(swiper)}
onSlideChange={() => console.log('slide change')}
>
<SwiperSlide>Slide 1</SwiperSlide>
<SwiperSlide>Slide 2</SwiperSlide>
...
</Swiper>
);
};
pageUpDown
to enable/disable pageUp and pageDown keys (enabled by default)UIWebView
text from codeslideTo
to last slide when it shouldn'tforceToAxis
also inverted scrollingscale
parameter (#3598)uniqueNavElements
(#3590)hashChange
and hashSet
events (#3557)<picture>
lazy loading (#3560)ssr-window
and dom7
dependencies to latest versionspaginationBulletMessage
(#3540, #3541)thumbs.autoScrollOffset
parameter that allows to set on what thumbs active slide from edge. It should automatically move scroll thumbscssMode
behavior in RTL layoutcenteredSlides
enabledzoom.in()
API (#3451)<picture>
element (#3456)swiper-zoom-target
class to such elementsstretch
parameter now can be set in %
(#3468)label
to list of form events to keep clicks on it (#3407)slidesPerGroupSkip
behavior (#3361)beforeLoopFix
and loopFix
updateOnWindowResize
(by default true
) that will update/recalc swiper on window resize/orientationchange--swiper-theme-color
variable when not building from source (#3334).once
could be called more than once (#3322)multipleActiveThumbs
(by default true
) option to control whether multiple thumbnail slides may get activated or not.centeredSlidesBounds
parameter that when enabled will keep first and last slides at boundsfreeMode
could break position on resize (#2708, #3303)freeModeSticky
(#3302)watchOverflow
and slidesOffsetBefore
/slidesOffsetAfter
couldn't work together (#3291)translateTo
method #3268loop: true
#3255slidesPerView
could break loop mode (#3225 by @robpop)paused
after returning from hidden tabtouchEventsTarget
defaults back to container
touchcancel
event #3219slidesPerColumnFill: 'row'
modecssMode: true
). It doesn't support all of Swiper's features, but potentially should bring a much better performance in simple configurationsbreakpointsInverse
parameter has been removed and now breakpoints
behave like with breakpointsInverse: true
before.touchMoveStopPropagation
parameter now defaults to false
click
event won't be fired with 300ms delay anymore. Now it will be fired at the same time as tap
eventslidesPerColumnFill: 'column'
it now uses flex-direction: column
layout which requires specified height on swiper-containertouchEventsTarget
now defaults to wrapper
(rather than container
like before)slidesPerColumn
now can be used with breakpoints--swiper-theme-color: #007aff;
es
module "tree-shake-ability"swiper.esm.browser.bundle.js
package that can be used directly in browser (import Swiper from 'swiper.esm.browser.bundle.js'
)--swiper-preloader-color
CSS custom property (which is defaults to --swiper-theme-color
)--swiper-pagination-color
property (which is defaults to --swiper-theme-color
)--swiper-navigation-color
property (which is defaults to --swiper-theme-color
)--swiper-navigation-size
(defaults to 44px
) it is now possible to change size of the navigation buttons (and icons)slidesPerColumnFill: 'row'
now considers groups (#3077)indexOf
of undefined' that sometimes occurs on use of thumbnailsPageUp
/PageDown
keybindings.swiper.changeDirection()
method to change direction from horizontal to vertical (and back) dynamicallydirection
parameter can be used in breakpointsswiper.virtual.appendSlide
now accepts array of slides to addswiper.virtual.prependSlide
now accepts array of slides to prependswiper.virtual.removeSlide(indexes)
to remove virtual selected slidesswiper.virtual.removeAllSlides()
to remove all virtual slidesnavigationHide
and navigationShow
events when on nav hide/showpaginationHide
and paginationShow
events when on pagination hide/show.once
bound event could still be there after unbinding it with .off
observeSlideChildren
parameter to enable auto update on slide children updatezoomChange
event with scale
, imageEl
and slideEl
argumentstouchStartForcePreventDefault
parameter to force touch start event prevent defaultcenterInsufficientSlides
parameter to center slides if the amount of slides less than slidesPerView
breakpointsInverse
parameter (boolean), if enabled then it will count breakpoints in reversed direction, e.g. will override parameters if window width is more than specified breakpointaddSlidesBefore
and addSlidesAfter
parameters to increase amount of pre-rendered slidesiOSEdgeSwipeThreshold
parameter renamed to just edgeSwipeThreshold
. Old iOSEdgeSwipeThreshold
name is still supportedaddSlide(index, slide)
method to add slide at required position. Thanks to @kochizufanformatFractionCurrent(number)
parameter to format current number in Fraction paginationformatFractionTotal(number)
parameter to format total number in Fraction paginationswipeBack
sometimes slides to wrong slideiOSEdgeSwipeDetection
. Thanks to @langjunconsole.log
cleanup.update()
methodprogressbarOpposite
parameter to make pagination progressbar opposite to direction
parameter, means vertical progressbar for horizontal swiper direction and horizontal progressbar for vertical swiper directionloop
+ freeMode
for loop not being set correctlyswiper.updateAutoHeight(speed)
now supports speed
parameter to resize swiper wrapper with durationfreeModeSticky
not being able to snap to closest snap pointswiper.slideToClosest()
method to slide to closest snap point when it is somewhere in betweennoSwipingSelector
parameter that can be used instead of noSwipingClass
preventIntercationOnTransition
parameter to prevent interaction during slice change transition.slideToLoop
method to be used in loop modeslideChange
events being fired when slide wasn't actually changedsimulateTouch
for desktops when it is draggable
watchOverflow
(disabled by default). When enabled Swiper will be disabled and hide navigation buttons on case there are not enough slides for slidingreverseDirection
to enable autoplay in reverse directionwaitForTransition
parameter when autoplay will wait for wrapper transition to continue (enabled by default). Can be disabled in case of using Virtual Translate when your slider may not have transitiononlyInViewport
parameter (enabled by default). When enabled it will control sliders that are currently in viewporttouchReleaseOnEdges
on iOSdragSize
iOSEdgeSwipeDetection
will also be in consideration with right-edge swipefreeModeSticky
behavior in RTL modebreakpoint
event on breakpoint changenoSwiping
parameterslidesPerGroup
parameterbreakpoints
document
objectslidesPerView: 'auto'
build-dev
-> build:dev
, build-prod
-> build:prod
beforeResize
eventrealIndex
calculation orderingswiper.module.js
-> swiper.esm.bundle.js
(exported by default)swiper.modular.js
-> swiper.esm.js
swiper.module.js
- swiper bundle for import Swiper from 'swiper'
swiper.modular.js
- modular version for using Swiper with required components onlyscripts/build-config.js
for creating custom Swiper build with required components and custom color themeonAfterResize
and onBeforeResize
callbacksonKeyPress
callback when keyboard control is usedgulp custom -zoom,effects,lazy-loading
<div class="swiper-slide">
<div class="swiper-zoom-container">
<img src="path/to/image">
</div>
</div>
zoom
- enable zoom functionalityzoomMax
- maximum image zoom multiplier, by default is 3
zoomMin
- minimum image zoom multiplier, by default is 1
zoomToggle
- enable/disable zoom-in by slide's double tapzoomMax
can be also overridden for specific slide by using data-swiper-zoom
attributeswiper.enableTouchControl()
and swiper.disableTouchControl()
methods to enable disable touch control (it toggles onlyExternal
parameter)swiper.realIndex
property in addition to swiper.activeIndex
that returns index of active slide considering loophistory
parameter. It uses history pushState to set active slide URLhashnavWatchState
parameter to navigate through slides (when hashnav is enabled) by browser history or by setting directly hash on document locationreplaceState
parameter that work in addition to hashnav or history to replace current url state with the new one instead of adding it to historys.unsetGrabCursor()
and s.setGrabCursor()
to enable/disable grab cursorsimulateTouch:false
normalizeSlideIndex
parameter to improve work of controller (see #1766)lazyLoadingInPrevNextAmount
now works with slidesPerView: 'auto'
passiveListeners
parameter to use passive event listeners to improve scrolling performance on mobile devices. Enabled by defaultfreeModeMomentumVelocityRatio
parameter to control moment velocitydata-swiper-autoplay
attribute on themsizes
responsive images attributemousewheelEventsTarged
parameter (by default 'container') where you can specify mousewheel events targetonScroll
event/callback that triggers when swiping/scrolling happens with mousewheeltouchReleaseOnEdges
parameter to release touch events on slider edge position (beginning, end) and allow for further page scrollingpaginationBulletRender
now accepts swiper
instance as a first argument, paginationBulletRender(index, className)
-> paginationBulletRender(swiper, index, className)
uniqueNavElements
parameter. If enabled (by default) and navigation elements' parameters passed as the string (like .pagination
) then Swiper will look for such elements through child elements first. Applies for pagination, prev/next buttons and scrollbaronPaginationRendered
callback. Will be fired after pagination elements generated and added to DOM.reLoop()
method, which combines .destroyLoop()
+ .createLoop()
methods with additional positioning fixes. Useful to call after you have changed slidesPerView
parameter, it will dynamically recreate duplicated slides required for loop.nextButton
and .prevButton
properties with Dom7/jQuery element with next/prev button HTML elementslidesPerView/Group
parameterspaginationType
- type of pagination. Can be 'bullets'
(default) or 'fraction'
or 'progress'
or 'custom'
paginationFractionRender(swiper, currentClass, totalClass)
- custom function to render "fraction" type paginationpaginationProgressRender(swiper, progressbarClass)
- custom function to render "progress" type paginationpaginationCustomRender(swiper, current, total)
- custom function to render "custom" type paginationlazyLoadingInPrevNextAmount
parameter allows to lazy load images in specified amount of next/prev slidesautoplayStopOnLast
parameter (true
by default) tells to autoplay should it stop on last slide or start from first slideonAutoplay(swiper)
callbackmousewheelControl
autoHeight: true
parametersetWrapperTranslate
Added responsive breakpoints support using new breakpoints
parameter. Now you can specify different slidesPerView
and other similar parameters for different sizes:
slidesPerView: 5,
spaceBetween: 50,
breakpoints: {
1024: {
slidesPerView: 4,
spaceBetween: 40
},
768: {
slidesPerView: 3,
spaceBetween: 30
},
320: {
slidesPerView: 1,
spaceBetween: 10
}
}
New callbacks: onSlideNextStart
, onSlideNextEnd
, onSlidePrevStart
, onSlidePrevEnd
Added Meteor package meteor add nolimits4web:swiper
Fixed issue with mouse touchMove/End callbacks firing all the time
Fixed issue with mousewheel in Chrome
Minor fixes
undefined
-src imagesslideToClickedSlide
with loop
and centeredSlides
slidesPerView * slidesPerColumn
with slidesPerColumnFill: 'row'
srcset
with lazy loading using data-srcset
attributeWebkitCSSMatrix
slideToClickedSlide
with loop
and centeredSlides
freeModeMinimumVelocity
parameter to set minimum required touch velocity to trigger free mode momentumscrollbarDraggable
- (boolean) by default is false
. Allows to enable draggable scrollbarscrollbarSnapOnRelease
- (boolean) by default is false
. Control slider snap on scrollbar releaseslidesPerView: 'auto'
and enabled loop:true
mode to set loopedSlides
to the amount of slides by default (if not specified)mousewheelSensitivity: 1
parameter allows to tweak mouse wheel sensitivityallowSwipeToNext
/allowSwipeToPrev
)centeredSlides
iOSEdgeSwipeDetection
(by default is false
) - enable ios edge detection and release Swiper eventsiOSEdgeSwipeThreshold
(default value is 20
) - area in px
from left edge of screen to release eventspaginationBulletMessage: 'Go to slide {{index}}'
controlBy
which can be 'slide' (by default) or 'container'. Defines a way how to control another slider: slide by slide or depending on all slides/container (like before)controlBy: 'slide'
(default) mode will respect grid of each otherpaginationElement
parameter defines which HTML tag will be used to represent single pagination bullet. By default it is span
roundLengths
parameter (by default is false
) to round values of slides width and height to prevent blurry texts on usual resolution screensslidesOffsetBefore: 0
and slidesOffsetAfter: 0
(in px) parameters to add additional slide offset within a container.swiper-container
onlyExternal
during touchmoveswiper.jquery.umd.js
version for the environment where both Swiper and jQuery included as modulesmousewheelReleaseOnEdges
- will release mousewheel event and allow page scrolling when swiper is on edge positions (in the beginning or in the end)mousewheelInvert
- option to invert mousewheel slidesslidesPerView
> 1slidesPerColumn
> 1)width
and height
parameters to force Swiper size, useful when it is hidden on intializationdata-background
attribute on required elementsfreeModeSticky
parameter) which will snap to slides positions in free mode.destroy(deleteInstance, cleanupStyles)
method now has second cleanupStyles
argument, when passed - all custom styles will be removed from slides, wrapper and container. Useful if you need to destroy Swiper and to init again with new options or in different directiona11y: false
- enable accessibilityprevSlideMessage: 'Previous slide'
- message for screen readers for previous buttonnextSlideMessage: 'Next slide'
- message for screen readers for next buttonfirstSlideMessage: 'This is the first slide'
- message for screen readers for previous button when swiper is on first slidelastSlideMessage: 'This is the last slide'
- message for screen readers for next button when swiper is on last slide.on(event, handler)
- add event/callback.off(event, handler)
- remove this event/callback.once(event, handler)
- add event/callback that will be executed only oncesetWrapperSize
(be default it is false
) to provide better compatibility with browser without flexbox support. Enabled this option and plugin will set width/height on swiper wrapper equal to total size of all slidesvirtualTranslate
parameter. When it is enabled swiper will be operated as usual except it will not move. Useful when you may need to create custom slide transitiononLazyImage...
callbacksslidesPerGroup
lazyLoading
, lazyLoadingInPrevNext
, lazyLoadingOnTransitionStart
(all disabled by default)onLazyImageLoad
and onLazyImageReady
updateOnImages
ready split into 2 parameters:
preloadImages
(by default is true) - to preload all images on swiper initupdateOnImages
(by default is true) - update swiper when all images loadedonObserverUpdate
callback function to be called after updates by observerpaginationBulletRender
parameter that accepts function which allow custom pagination elements layoutrunCallbacksOnInit
parameterwatchVisibility
parameter renamed to watchSlidesVisibility
crossFade
option for fade effect.update
method improved to fully cover what onResize
do for full and correct updateswiper.touches
object with the following properties: startX
, startY
, currentX
, currentY
, diff
.removeSlide(index)
or .removeSlide([indexes])
- to remove selected slides.removeAllSlides()
- to remove all slidesoverflow: auto
with -webkit-overflow-scrolling: touch
slidesPerColumn
optionborder-box
now, so it is possible to use borders and paddings directly on slidesslidesPerView: 'auto'
) now gives more freedom, you can even specify slides sizes in % and use margins on them