Overview

The Slide sub-component handles each slide. Use the Slides component to interact this because the Components collection does not contain this component.

Properties

index

index: number

The index of the slide. This can be negative or greater than the number of slides for clones.


slideIndex

slideIndex: number

The slide index where the clone corresponds. This is -1 for normal slides.


slide

slide: HTMLElement

The slide element.


container

container: HTMLElement

The container element if available, or otherwise undefined.


isClone

isClone: boolean

Indicates whether the component contains a cloned slide or not.

Methods

style()

style( prop: string, value: string | number, useContainer?: boolean ): void

Adds a CSS rule to the slide or the container.

isWithin()

isWithin( from: number, distance: number ): boolean

Calculates how far this slide is from another slide and returns true if the distance is within the given distance.