Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • VirtualOptions

Index

Properties

Optional addSlidesAfter

addSlidesAfter: number

Increases amount of pre-rendered slides after active slide

default

0

Optional addSlidesBefore

addSlidesBefore: number

Increases amount of pre-rendered slides before active slide

default

0

Optional cache

cache: boolean

Enables DOM cache of rendering slides html elements. Once they are rendered they will be saved to cache and reused from it.

default

true

Optional enabled

enabled: boolean

Optional renderExternal

renderExternal: (data: VirtualData) => any

Type declaration

    • Function for external rendering (e.g. using some other library to handle DOM manipulations and state like React.js or Vue.js). As an argument it accepts data object with the following properties:

      • offset - slides left/top offset in px
      • from - index of first slide required to be rendered
      • to - index of last slide required to be rendered
      • slides - array with slide items to be rendered

      Parameters

      Returns any

Optional renderExternalUpdate

renderExternalUpdate: boolean

When enabled (by default) it will update Swiper layout right after renderExternal called. Useful to disable and update swiper manually when used with render libraries that renders asynchronously

default

true

Optional renderSlide

renderSlide: (slide: any, index: any) => any

Type declaration

    • (slide: any, index: any): any
    • Function to render slide. As an argument it accepts current slide item for slides array and index number of the current slide. Function must return an outter HTML of the swiper slide.

      Parameters

      • slide: any
      • index: any

      Returns any

Optional slides

slides: any[]

Array with slides

default

[]

Generated using TypeDoc