Options
All
  • Public
  • Public/Protected
  • All
Menu

Object with scrollbar parameters.

example
const swiper = new Swiper('.swiper-container', {
  scrollbar: {
    el: '.swiper-scrollbar',
    draggable: true,
  },
});

Hierarchy

  • ScrollbarOptions

Index

Properties

Optional dragClass

dragClass: string

Scrollbar draggable element CSS class

default

'swiper-scrollbar-drag'

Optional dragSize

dragSize: number | "auto"

Size of scrollbar draggable element in px

default

'auto'

Optional draggable

draggable: boolean

Set to true to enable make scrollbar draggable that allows you to control slider position

default

false

Optional el

el: null | HTMLElement | CSSSelector

String with CSS selector or HTML element of the container with scrollbar.

default

null

Optional hide

hide: boolean

Hide scrollbar automatically after user interaction

default

true

Optional lockClass

lockClass: string

Scrollbar element additional CSS class when it is disabled

default

'swiper-scrollbar-lock'

Optional snapOnRelease

snapOnRelease: boolean

Set to true to snap slider position to slides when you release scrollbar

default

false

Generated using TypeDoc