Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Methods

Optional _beforeBreakpoint

  • !INTERNAL: Event will fired right before breakpoint change

    Parameters

    Returns void

Optional _containerClasses

  • _containerClasses(swiper: default, classNames: string): void
  • !INTERNAL: Event will fired after setting CSS classes on swiper container element

    Parameters

    • swiper: default
    • classNames: string

    Returns void

Optional _freeModeNoMomentumRelease

  • _freeModeNoMomentumRelease(swiper: default): void
  • !INTERNAL: Event will be fired on free mode touch end (release) and there will no be momentum

    Parameters

    Returns void

Optional _slideClass

  • _slideClass(swiper: default, slideEl: HTMLElement, classNames: string): void
  • !INTERNAL: Event will fired after setting CSS classes on swiper slide element

    Parameters

    • swiper: default
    • slideEl: HTMLElement
    • classNames: string

    Returns void

Optional _slideClasses

  • _slideClasses(swiper: default, slides: { classNames: string; index: number; slideEl: HTMLElement }[]): void
  • !INTERNAL: Event will fired after setting CSS classes on all swiper slides

    Parameters

    • swiper: default
    • slides: { classNames: string; index: number; slideEl: HTMLElement }[]

    Returns void

Optional _swiper

  • !INTERNAL: Event will fired as soon as swiper instance available (before init)

    Parameters

    Returns void

activeIndexChange

  • activeIndexChange(swiper: default): void
  • Event will fired on active index change

    Parameters

    Returns void

afterInit

  • Event will fired right after initialization

    Parameters

    Returns void

autoplay

  • Event will be fired when slide changed with autoplay

    Parameters

    Returns void

autoplayPause

  • autoplayPause(swiper: default): void
  • Event will be fired on autoplay pause

    Parameters

    Returns void

autoplayResume

  • autoplayResume(swiper: default): void

autoplayStart

  • autoplayStart(swiper: default): void
  • Event will be fired in when autoplay started

    Parameters

    Returns void

autoplayStop

  • autoplayStop(swiper: default): void
  • Event will be fired when autoplay stopped

    Parameters

    Returns void

autoplayTimeLeft

  • autoplayTimeLeft(swiper: default, timeLeft: number, percentage: number): void
  • Event triggers continuously while autoplay is enabled. It contains time left (in ms) before transition to next slide and percentage of that time related to autoplay delay

    Parameters

    • swiper: default
    • timeLeft: number
    • percentage: number

    Returns void

beforeDestroy

  • beforeDestroy(swiper: default): void
  • Event will be fired right before Swiper destroyed

    Parameters

    Returns void

beforeInit

  • beforeInit(swiper: default): void
  • Event will fired right before initialization

    Parameters

    Returns void

beforeLoopFix

  • beforeLoopFix(swiper: default): void
  • Event will be fired right before "loop fix"

    Parameters

    Returns void

beforeResize

  • beforeResize(swiper: default): void
  • Event will fired before resize handler

    Parameters

    Returns void

beforeSlideChangeStart

  • beforeSlideChangeStart(swiper: default): void
  • Event will fired before slide change transition start

    Parameters

    Returns void

beforeTransitionStart

  • beforeTransitionStart(swiper: default, speed: number, internal: any): void
  • Event will fired before transition start

    Parameters

    • swiper: default
    • speed: number
    • internal: any

    Returns void

breakpoint

  • Event will be fired on breakpoint change

    Parameters

    Returns void

changeDirection

  • changeDirection(swiper: default): void
  • Event will fired on direction change

    Parameters

    Returns void

click

  • click(swiper: default, event: MouseEvent | TouchEvent | PointerEvent): void
  • Event will be fired when user click/tap on Swiper. Receives touchend event as an arguments.

    Parameters

    • swiper: default
    • event: MouseEvent | TouchEvent | PointerEvent

    Returns void

destroy

  • Event will be fired on swiper destroy

    Parameters

    Returns void

doubleClick

  • doubleClick(swiper: default, event: MouseEvent | TouchEvent | PointerEvent): void
  • Event will be fired when user double click/tap on Swiper

    Parameters

    • swiper: default
    • event: MouseEvent | TouchEvent | PointerEvent

    Returns void

doubleTap

  • doubleTap(swiper: default, event: MouseEvent | TouchEvent | PointerEvent): void
  • Event will be fired when user double tap on Swiper's container. Receives touchend event as an arguments

    Parameters

    • swiper: default
    • event: MouseEvent | TouchEvent | PointerEvent

    Returns void

fromEdge

  • Event will be fired when Swiper goes from beginning or end position

    Parameters

    Returns void

hashChange

  • hashChange(swiper: default): void
  • Event will be fired on window hash change

    Parameters

    Returns void

hashSet

  • Event will be fired when swiper updates the hash

    Parameters

    Returns void

init

  • Fired right after Swiper initialization.

    note

    Note that with swiper.on('init') syntax it will work only in case you set init: false parameter.

    example
    const swiper = new Swiper('.swiper', {
      init: false,
      // other parameters
    });
    swiper.on('init', function() {
     // do something
    });
    // init Swiper
    swiper.init();
    
    example
    // Otherwise use it as the parameter:
    const swiper = new Swiper('.swiper', {
      // other parameters
      on: {
        init: function () {
          // do something
        },
      }
    });
    

    Parameters

    Returns any

keyPress

  • keyPress(swiper: default, keyCode: string): void
  • Event will be fired on key press

    Parameters

    Returns void

lock

  • Event will be fired when swiper is locked (when watchOverflow enabled)

    Parameters

    Returns void

loopFix

  • Event will be fired after "loop fix"

    Parameters

    Returns void

momentumBounce

  • momentumBounce(swiper: default): void
  • Event will be fired on momentum bounce

    Parameters

    Returns void

navigationHide

  • navigationHide(swiper: default): void

navigationNext

  • navigationNext(swiper: default): void
  • Event will be fired on navigation next button click

    Parameters

    Returns void

navigationPrev

  • navigationPrev(swiper: default): void
  • Event will be fired on navigation prev button click

    Parameters

    Returns void

navigationShow

  • navigationShow(swiper: default): void

observerUpdate

  • observerUpdate(swiper: default): void
  • Event will be fired if observer is enabled and it detects DOM mutations

    Parameters

    Returns void

orientationchange

  • orientationchange(swiper: default): void
  • Event will be fired on orientation change (e.g. landscape -> portrait)

    Parameters

    Returns void

paginationHide

  • paginationHide(swiper: default): void

paginationRender

  • paginationRender(swiper: default, paginationEl: HTMLElement): void
  • Event will be fired after pagination rendered

    Parameters

    • swiper: default
    • paginationEl: HTMLElement

    Returns void

paginationShow

  • paginationShow(swiper: default): void

paginationUpdate

  • paginationUpdate(swiper: default, paginationEl: HTMLElement): void
  • Event will be fired when pagination updated

    Parameters

    • swiper: default
    • paginationEl: HTMLElement

    Returns void

progress

  • progress(swiper: default, progress: number): void
  • Event will be fired when Swiper progress is changed, as an arguments it receives progress that is always from 0 to 1

    Parameters

    Returns void

reachBeginning

  • reachBeginning(swiper: default): void
  • Event will be fired when Swiper reach its beginning (initial position)

    Parameters

    Returns void

reachEnd

  • Event will be fired when Swiper reach last slide

    Parameters

    Returns void

realIndexChange

  • realIndexChange(swiper: default): void
  • Event will fired on real index change

    Parameters

    Returns void

resize

  • Event will be fired on window resize right before swiper's onresize manipulation

    Parameters

    Returns void

scroll

  • scroll(swiper: default, event: WheelEvent): void
  • Event will be fired on mousewheel scroll

    Parameters

    • swiper: default
    • event: WheelEvent

    Returns void

scrollbarDragEnd

  • scrollbarDragEnd(swiper: default, event: MouseEvent | TouchEvent | PointerEvent): void
  • Event will be fired on draggable scrollbar drag end

    Parameters

    • swiper: default
    • event: MouseEvent | TouchEvent | PointerEvent

    Returns void

scrollbarDragMove

  • scrollbarDragMove(swiper: default, event: MouseEvent | TouchEvent | PointerEvent): void
  • Event will be fired on draggable scrollbar drag move

    Parameters

    • swiper: default
    • event: MouseEvent | TouchEvent | PointerEvent

    Returns void

scrollbarDragStart

  • scrollbarDragStart(swiper: default, event: MouseEvent | TouchEvent | PointerEvent): void
  • Event will be fired on draggable scrollbar drag start

    Parameters

    • swiper: default
    • event: MouseEvent | TouchEvent | PointerEvent

    Returns void

setTransition

  • setTransition(swiper: default, transition: number): void
  • Event will be fired everytime when swiper starts animation. Receives current transition duration (in ms) as an arguments

    Parameters

    • swiper: default
    • transition: number

    Returns void

setTranslate

  • setTranslate(swiper: default, translate: number): void
  • Event will be fired when swiper's wrapper change its position. Receives current translate value as an arguments

    Parameters

    • swiper: default
    • translate: number

    Returns void

slideChange

  • slideChange(swiper: default): void
  • Event will be fired when currently active slide is changed

    Parameters

    Returns void

slideChangeTransitionEnd

  • slideChangeTransitionEnd(swiper: default): void
  • Event will be fired after animation to other slide (next or previous).

    Parameters

    Returns void

slideChangeTransitionStart

  • slideChangeTransitionStart(swiper: default): void
  • Event will be fired in the beginning of animation to other slide (next or previous).

    Parameters

    Returns void

slideNextTransitionEnd

  • slideNextTransitionEnd(swiper: default): void
  • Same as "slideChangeTransitionEnd" but for "forward" direction only

    Parameters

    Returns void

slideNextTransitionStart

  • slideNextTransitionStart(swiper: default): void
  • Same as "slideChangeTransitionStart" but for "forward" direction only

    Parameters

    Returns void

slidePrevTransitionEnd

  • slidePrevTransitionEnd(swiper: default): void
  • Same as "slideChangeTransitionEnd" but for "backward" direction only

    Parameters

    Returns void

slidePrevTransitionStart

  • slidePrevTransitionStart(swiper: default): void
  • Same as "slideChangeTransitionStart" but for "backward" direction only

    Parameters

    Returns void

slideResetTransitionEnd

  • slideResetTransitionEnd(swiper: default): void
  • Event will be fired in the end of animation of resetting slide to current one

    Parameters

    Returns void

slideResetTransitionStart

  • slideResetTransitionStart(swiper: default): void
  • Event will be fired in the beginning of animation of resetting slide to current one

    Parameters

    Returns void

sliderFirstMove

  • sliderFirstMove(swiper: default, event: TouchEvent): void
  • Event will be fired with first touch/drag move

    Parameters

    • swiper: default
    • event: TouchEvent

    Returns void

sliderMove

  • sliderMove(swiper: default, event: MouseEvent | TouchEvent | PointerEvent): void
  • Event will be fired when user touch and move finger over Swiper and move it. Receives touchmove event as an arguments.

    Parameters

    • swiper: default
    • event: MouseEvent | TouchEvent | PointerEvent

    Returns void

slidesGridLengthChange

  • slidesGridLengthChange(swiper: default): void
  • Event will be fired when slides grid has changed

    Parameters

    Returns void

slidesLengthChange

  • slidesLengthChange(swiper: default): void
  • Event will be fired when number of slides has changed

    Parameters

    Returns void

snapGridLengthChange

  • snapGridLengthChange(swiper: default): void
  • Event will be fired when snap grid has changed

    Parameters

    Returns void

snapIndexChange

  • snapIndexChange(swiper: default): void
  • Event will fired on snap index change

    Parameters

    Returns void

tap

  • tap(swiper: default, event: MouseEvent | TouchEvent | PointerEvent): void
  • Event will be fired when user click/tap on Swiper. Receives touchend event as an arguments.

    Parameters

    • swiper: default
    • event: MouseEvent | TouchEvent | PointerEvent

    Returns void

toEdge

  • Event will be fired when Swiper goes to beginning or end position

    Parameters

    Returns void

touchEnd

  • touchEnd(swiper: default, event: MouseEvent | TouchEvent | PointerEvent): void
  • Event will be fired when user release Swiper. Receives touchend event as an arguments.

    Parameters

    • swiper: default
    • event: MouseEvent | TouchEvent | PointerEvent

    Returns void

touchMove

  • touchMove(swiper: default, event: MouseEvent | TouchEvent | PointerEvent): void
  • Event will be fired when user touch and move finger over Swiper. Receives touchmove event as an arguments.

    Parameters

    • swiper: default
    • event: MouseEvent | TouchEvent | PointerEvent

    Returns void

touchMoveOpposite

  • touchMoveOpposite(swiper: default, event: MouseEvent | TouchEvent | PointerEvent): void
  • Event will be fired when user touch and move finger over Swiper in direction opposite to direction parameter. Receives touchmove event as an arguments.

    Parameters

    • swiper: default
    • event: MouseEvent | TouchEvent | PointerEvent

    Returns void

touchStart

  • touchStart(swiper: default, event: MouseEvent | TouchEvent | PointerEvent): void
  • Event will be fired when user touch Swiper. Receives touchstart event as an arguments.

    Parameters

    • swiper: default
    • event: MouseEvent | TouchEvent | PointerEvent

    Returns void

transitionEnd

  • transitionEnd(swiper: default): void
  • Event will be fired after transition.

    Parameters

    Returns void

transitionStart

  • transitionStart(swiper: default): void
  • Event will be fired in the beginning of transition.

    Parameters

    Returns void

unlock

  • Event will be fired when swiper is unlocked (when watchOverflow enabled)

    Parameters

    Returns void

update

  • Event will be fired after swiper.update() call

    Parameters

    Returns void

zoomChange

  • zoomChange(swiper: default, scale: number, imageEl: HTMLElement, slideEl: HTMLElement): void
  • Event will be fired on zoom change

    Parameters

    • swiper: default
    • scale: number
    • imageEl: HTMLElement
    • slideEl: HTMLElement

    Returns void

Generated using TypeDoc