Skip to main content
Version: 0.1.x

APIs

Swiper parameters

ParameterTypedefaultDescription
directionstring'horizontal'Could be 'horizontal' or 'vertical' (for vertical slider).
speednumber300Duration of transition between slides (in ms)
intermittentnumber0Time to suspend between two swip actions. Only for mousewheel mode.
initialSlidenumber0Index number of initial slide.
spaceBetweennumber0Distance between slides in px.
longSwipesMsnumber300Minimal duration (in ms) to trigger swipe to next/previous slide during long swipes
longSwipesRationumber0.5Ratio to trigger swipe to next/previous slide during long swipes.
slidePrevClassstring'swiper-slide-prev'CSS class name of slide which is right before currently active slide
slideNextClassstring'swiper-slide-next'CSS class name of slide which is right after currently active slide
slideActiveClassstring'swiper-slide-active'CSS class name of currently active slide
slideClassstring'swiper-slide'CSS class name of slide
wrapperClassstring'swiper-wrapper'CSS class name of slides' wrapper
touchRationumber1Touch ratio
touchAnglenumber45Allowable angle (in degrees) to trigger touch move. Range of values: [0, 90].
touchStartPreventDefaultbooleantrueIf disabled, touchstart (mousedown) event won't be prevented
touchStartForcePreventDefaultbooleanfalseForce to always prevent default for touchstart (mousedown) event
touchMoveStopPropagationbooleanfalseIf enabled, then propagation of "touchmove" will be stopped
mousewheelobject/booleanfalseEnables navigation through slides using mouse wheel. Object with mousewheel parameters or boolean true to enable with default settings.
paginationobject/booleanfalseObject with navigation parameters.
passiveListenersbooleantruePassive 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
resistancebooleantrueSet to false if you want to disable resistant bounds
resistanceRationumber0.85This option allows you to control resistance ratio

Mousewheel Control Parameters

ParameterTypedefaultDescription
sensitivitynumber1Multiplier of mousewheel data, allows to tweak mouse wheel sensitivity
invertbooleanfalseSet to true to invert sliding direction

Pagination Parameters

ParameterTypedefaultDescription
clickablebooleanfalseIf true then clicking on pagination button will cause transition to appropriate slide
bulletClassstring'swiper-pagination-bullet'CSS class name of single pagination bullet
bulletActiveClassstring'swiper-pagination-bullet-active'CSS class name of currently active pagination bullet