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

Whether the virtual slides are enabled

default

false

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 slides

slides: any[]

Array with slides

default

[]

Methods

Optional renderExternal

  • 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
    default

    null

    Parameters

    Returns any

Optional renderSlide

  • renderSlide(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 outer HTML of the swiper slide or slide HTML element.

    default

    null

    Parameters

    • slide: any
    • index: any

    Returns any

Generated using TypeDoc