Object with a11y parameters or boolean true
to enable with default settings.
Set to false
to disable swiping to next slide direction (to right or bottom)
Set to false
to disable swiping to previous slide direction (to left or top)
If false
, then the only way to switch the slide is use of external API functions like slidePrev or slideNext
Set to true
and slider wrapper will adapt its height to the height of the currently active slide
Object with autoplay parameters or boolean true
to enable with default settings
Allows to set different parameter for different responsive breakpoints (screen sizes). Not all parameters can be changed in breakpoints, only those which do not require different layout and logic, like slidesPerView
, slidesPerGroup
, spaceBetween
, grid.rows
. Such parameters like loop
and effect
won't work
Base for breakpoints (beta). Can be window
or container
. If set to window
(by default) then breakpoint keys mean window width. If set to container
then breakpoint keys treated as swiper container width
Object with Cards-effect parameters
When enabled it center slides if the amount of slides less than slidesPerView
. Not intended to be used loop
mode and grid.rows
If true
, then active slide will be centered, not always on the left side.
If true
, then active slide will be centered without adding gaps at the beginning and end of slider.
Required centeredSlides: true
. Not intended to be used with loop
or pagination
The beginning of the modifier CSS class that can be added to swiper container depending on different parameters
Object with controller parameters or boolean true
to enable with default settings
Object with Coverflow-effect parameters.
When enabled Swiper will automatically wrap slides with swiper-wrapper element,
and will create required elements for navigation, pagination and scrollbar
they are enabled (with their respective params object or with boolean true
))
Object with Creative-effect parameters
When enabled it will use modern CSS Scroll Snap API. It doesn't support all of Swiper's features, but potentially should bring a much better performance in simple configurations.
This is what is not supported when it is enabled:
speed
parameter may not have no effectslideChange
instead)slidesPerGroup
has limited supportsimulateTouch
doesn't have effect and "dragging" with mouse doesn't workresistance
doesn't have any effectallowSlidePrev/Next
swipeHandler
freeMode
and all relevant featuresObject with Cube-effect parameters
Can be 'horizontal'
or 'vertical'
(for vertical slider).
Enable to release Swiper events for swipe-back work in app. If set to 'prevent'
then it will prevent system swipe-back navigation instead
Area (in px) from left edge of the screen to release touch events for swipe-back in app
Transition effect. Can be 'slide'
, 'fade'
, 'cube'
, 'coverflow'
, 'flip'
or 'creative'
Whether Swiper initially enabled. When Swiper is disabled, it will hide all navigation elements and won't respond to any events and interactions
Object with Fade-effect parameters
Object with Flip-effect parameters
CSS selector for focusable elements. Swiping will be disabled on such elements if they are "focused"
If disabled, then slider will be animated only when you release it, it will not move while you hold your finger on it
Enables free mode functionality. Object with free mode parameters or boolean true
to enable with default settings.
This option may a little improve desktop usability. If true
, user will see the "grab" cursor when hover on Swiper
Object with grid parameters to enable "multirow" slider.
Enables hash url navigation to for slides.
Object with hash navigation parameters or boolean true
to enable with default settings
Swiper height (in px). Parameter allows to force Swiper height. Useful only if you initialize Swiper when it is hidden and in SSR and Test environments for correct Swiper initialization
Enables history push state where every slide will have its own url. In this parameter you have to specify main slides url like "slides"
and specify every slide url using data-history
attribute.
Object with history navigation parameters or boolean true
to enable with default settings
Whether Swiper should be initialised automatically when you create an instance.
If disabled, then you need to init it manually by calling swiper.init()
Index number of initial slide.
Enables navigation through slides using keyboard. Object with keyboard parameters or boolean true
to enable with default settings
Enables images lazy loading. Object with lazy loading parameters or boolean true
to enable with default settings
Set to false
if you want to disable long swipes
Minimal duration (in ms) to trigger swipe to next/previous slide during long swipes
Ratio to trigger swipe to next/previous slide during long swipes
Set to true
to enable continuous loop mode
Because of nature of how the loop mode works, it will add duplicated slides. Such duplicated slides will have additional classes:
swiper-slide-duplicate
- represents duplicated slideswiper-slide-duplicate-active
- represents slide duplicated to the currently active slideswiper-slide-duplicate-next
- represents slide duplicated to the slide next to activeswiper-slide-duplicate-prev
- represents slide duplicated to the slide previous to activeAddition number of slides that will be cloned after creating of loop
Enable and loop mode will fill groups with insufficient number of slides with blank slides. Good to be used with slidesPerGroup
parameter
When enabled it prevents Swiper slide prev/next transitions when transitions is already in progress (has effect when loop
enabled)
If you use slidesPerView:'auto'
with loop mode you should tell to Swiper how many slides it should loop (duplicate) using this parameter
When enabled then amount of duplicated slides will not exceed amount of original slides. Useful to disable and increase loopedSlides
when you have a lot of slides per view and not sufficient amount of original slides
If total number of slides less than specified here value, then Swiper will enable backface-visibility: hidden
on slide elements to reduce visual "flicker" in Safari.
Array with Swiper modules
Enables navigation through slides using mouse wheel. Object with mousewheel parameters or boolean true
to enable with default settings
Object with navigation parameters or boolean true
to enable with default settings.
Set to true
on Swiper for correct touch events interception. Use only on
swipers that use same direction as the parent one
Enable/disable swiping on elements matched to class specified in noSwipingClass
Specify noSwiping
's element css class
Can be used instead of noSwipingClass
to specify elements to disable swiping on.
For example 'input'
will disable swiping on all inputs
Normalize slide index.
Set to true
if you also need to watch Mutations for Swiper parent elements
Set to true
if you also need to watch Mutations for Swiper slide children elements
Set to true
to enable Mutation Observer on Swiper and its elements. In this case Swiper will be updated (reinitialized) each time if you change its style (like hide/show) or modify its child elements (like adding/removing slides)
Register event handlers
!INTERNAL: Event will fired right before breakpoint change
!INTERNAL: Event will fired after setting CSS classes on swiper container element
!INTERNAL: Event will be fired on free mode touch end (release) and there will no be momentum
!INTERNAL: Event will fired after setting CSS classes on swiper slide element
!INTERNAL: Event will fired after setting CSS classes on all swiper slides
!INTERNAL: Event will fired as soon as swiper instance available (before init)
Event will fired on active index change
Event will fired right after initialization
Event will be fired when slide changed with autoplay
Event will be fired on autoplay pause (on mouse/pointer enter), when pauseOnMouseEnter
enabled
Event will be fired on autoplay resume (on mouse/pointer leave), when pauseOnMouseEnter
enabled
Event will be fired in when autoplay started
Event will be fired when autoplay stopped
Event will be fired right before Swiper destroyed
Event will fired right before initialization
Event will be fired right before "loop fix"
Event will fired before resize handler
Event will fired before slide change transition start
Event will fired before transition start
Event will be fired on breakpoint change
Event will fired on direction change
Event will be fired when user click/tap on Swiper. Receives touchend
event as an arguments.
Event will be fired on swiper destroy
Event will be fired when user double click/tap on Swiper
Event will be fired when user double tap on Swiper's container. Receives touchend
event as an arguments
Event will be fired when Swiper goes from beginning or end position
Event will be fired on window hash change
Event will be fired when swiper updates the hash
Event will be fired right after all inner images are loaded. updateOnImagesReady should be also enabled
Fired right after Swiper initialization.
Event will be fired on key press
Event will be fired in the beginning of lazy loading of image
Event will be fired when lazy loading image will be loaded
Event will be fired when swiper is locked (when watchOverflow
enabled)
Event will be fired after "loop fix"
Event will be fired on momentum bounce
Event will be fired on navigation hide
Event will be fired on navigation next button click
Event will be fired on navigation prev button click
Event will be fired on navigation show
Event will be fired if observer is enabled and it detects DOM mutations
Event will be fired on orientation change (e.g. landscape -> portrait)
Event will be fired on pagination hide
Event will be fired after pagination rendered
Event will be fired on pagination show
Event will be fired when pagination updated
Event will be fired when Swiper progress is changed, as an arguments it receives progress that is always from 0 to 1
Event will be fired when Swiper reach its beginning (initial position)
Event will be fired when Swiper reach last slide
Event will fired on real index change
Event will be fired on window resize right before swiper's onresize manipulation
Event will be fired on mousewheel scroll
Event will be fired on draggable scrollbar drag end
Event will be fired on draggable scrollbar drag move
Event will be fired on draggable scrollbar drag start
Event will be fired everytime when swiper starts animation. Receives current transition duration (in ms) as an arguments
Event will be fired when swiper's wrapper change its position. Receives current translate value as an arguments
Event will be fired when currently active slide is changed
Event will be fired after animation to other slide (next or previous).
Event will be fired in the beginning of animation to other slide (next or previous).
Same as "slideChangeTransitionEnd" but for "forward" direction only
Same as "slideChangeTransitionStart" but for "forward" direction only
Same as "slideChangeTransitionEnd" but for "backward" direction only
Same as "slideChangeTransitionStart" but for "backward" direction only
Event will be fired in the end of animation of resetting slide to current one
Event will be fired in the beginning of animation of resetting slide to current one
Event will be fired with first touch/drag move
Event will be fired when user touch and move finger over Swiper and move it. Receives touchmove
event as an arguments.
Event will be fired when slides grid has changed
Event will be fired when number of slides has changed
Event will be fired when snap grid has changed
Event will fired on snap index change
Event will be fired when user click/tap on Swiper. Receives touchend
event as an arguments.
Event will be fired when Swiper goes to beginning or end position
Event will be fired when user release Swiper. Receives touchend
event as an arguments.
Event will be fired when user touch and move finger over Swiper. Receives touchmove
event as an arguments.
Event will be fired when user touch and move finger over Swiper in direction opposite to direction parameter. Receives touchmove
event as an arguments.
Event will be fired when user touch Swiper. Receives touchstart
event as an arguments.
Event will be fired after transition.
Event will be fired in the beginning of transition.
Event will be fired when swiper is unlocked (when watchOverflow
enabled)
Event will be fired after swiper.update() call
Event will be fired on zoom change
Object with pagination parameters or boolean true
to enable with default settings.
Object with parallax parameters or boolean true
to enable with default settings.
Passive event listeners will be used by default where possible to improve scrolling performance on mobile devices.
But if you need to use e.preventDefault
and you have conflict with it, then you should disable this parameter
When enabled Swiper will force to load all images
Set to true
to prevent accidental unwanted clicks on links during swiping
Set to true
to stop clicks event propagation on links during swiping
When enabled it won't allow to change slides by swiping or navigation/pagination buttons during transition
Set to false
if you want to disable resistant bounds
This option allows you to control resistance ratio
When enabled it will use ResizeObserver (if supported by browser) on swiper container to detect container resize (instead of watching for window resize)
Set to true
to enable "rewind" mode. When enabled, clicking "next" navigation button (or calling .slideNext()
) when on last slide will slide back to the first slide. Clicking "prev" navigation button (or calling .slidePrev()
) when on first slide will slide forward to the last slide.
Set to true
to round values of slides width and height to prevent blurry texts on usual
resolution screens (if you have such)
Fire Transition/SlideChange/Start/End events on swiper initialization. Such events will be fired on initialization in case of your initialSlide is not 0, or you use loop mode
Object with scrollbar parameters or boolean true
to enable with default settings.
Enabled this option and plugin will set width/height on swiper wrapper equal to total size of all slides. Mostly should be used as compatibility fallback option for browser that don't support flexbox layout well
Set to false
if you want to disable short swipes
If true
, Swiper will accept mouse events like touch events (click and drag to change slides)
CSS class name of currently active slide
CSS class name of blank slide append to fill groups in loop mode when loopFillGroupWithBlank
is also enabled
CSS class name of slide
CSS class name of duplicated slide which represents the currently active slide
CSS class name of slide duplicated by loop mode
CSS class name of duplicated slide which represents the slide next to active slide
CSS class name of duplicated slide which represents the slide previous to active slide
CSS class name of slide which is right after currently active slide
CSS class name of slide which is right before currently active slide
Set to true
and click on any slide will produce transition to this slide
CSS class name of currently visible slide
Add (in px) additional slide offset in the end of the container (after all slides)
Add (in px) additional slide offset in the beginning of the container (before all slides)
Set numbers of slides to define and enable group sliding. Useful to use with slidesPerView > 1
This param intended to be used only with slidesPerView: 'auto'
and slidesPerGroup: 1
. When enabled, it will skip all slides in view on .slideNext()
& .slidePrev()
methods calls, on Navigation "buttons" clicks and in autoplay.
The parameter works in the following way: If slidesPerGroupSkip
equals 0
(default), no slides are excluded from grouping, and the resulting behaviour is the same as without this change.
If slidesPerGroupSkip
is equal or greater than 1
the first X slides are treated as single groups, whereas all following slides are grouped by the slidesPerGroup
value.
Number of slides per view (slides visible at the same time on slider's container).
Distance between slides in px.
Duration of transition between slides (in ms)
String with CSS selector or HTML element of the container with pagination that will work as only available handler for swiping
Threshold value in px. If "touch distance" will be lower than this value then swiper will not move
Object with thumbs component parameters
Allowable angle (in degrees) to trigger touch move
Target element to listen touch events on. Can be 'container'
(to listen for touch events on swiper) or 'wrapper'
(to listen for touch events on swiper-wrapper)
If enabled, then propagation of "touchmove" will be stopped
Touch ratio
Enable to release touch events on slider edge position (beginning, end) to allow for further page scrolling
Force to always prevent default for touchstart
(pointerdown
) event
If disabled, touchstart
(pointerdown
) event won't be prevented
If enabled (by default) and navigation elements' parameters passed as a string (like ".pagination"
)
then Swiper will look for such elements through child elements first.
Applies for pagination, prev/next buttons and scrollbar elements
When enabled Swiper will be reinitialized after all inner images ( tags) are loaded. Required preloadImages: true
Swiper will recalculate slides position on window resize (orientationchange)
Required for active slide detection when rendered on server-side and enabled history
userAgent string. Required for browser/device detection when rendered on server-side
Enables virtual slides functionality. Object with virtual slides parameters or boolean true
to enable with default settings.
Enabled this option and swiper will be operated as usual except it will not move, real translate values on wrapper will not be set. Useful when you may need to create custom slide transition
When enabled Swiper will be disabled and hide navigation buttons on case there are not enough slides for sliding.
Enable this feature to calculate each slides progress and visibility (slides in viewport will have additional visible class)
Swiper width (in px). Parameter allows to force Swiper width. Useful only if you initialize Swiper when it is hidden and in SSR and Test environments for correct Swiper initialization
CSS class name of slides' wrapper
Enables zooming functionality. Object with zoom parameters or boolean true
to enable with default settings
Add event listener that will be fired on all events
Generated using TypeDoc
!INTERNAL When enabled will emit "_containerClasses" and "_slideClass" events