Carousel

open class Carousel(direction: CarouselDirection? = null, fullscreen: Boolean? = null, overscrollable: Boolean? = null, autoScroll: Boolean? = null, animation: Boolean? = null, swipeable: Boolean? = null, initialIndex: Int? = null, className: String? = null, init: Carousel.() -> Unit? = null)

A carousel component.

Parameters

direction

a carousel direction

fullscreen

whether the carousel should fill the whole screen

overscrollable

whether the carousel should scroll past first and last items

autoScroll

whether the carousel will be automatically scrolled to the closest item border

animation

determines if the transitions are animated

swipeable

determines if the carousel can be scrolled by drag or swipe

className

CSS class names

init

an initializer extension function

Constructors

Link copied to clipboard
constructor(direction: CarouselDirection? = null, fullscreen: Boolean? = null, overscrollable: Boolean? = null, autoScroll: Boolean? = null, animation: Boolean? = null, swipeable: Boolean? = null, initialIndex: Int? = null, className: String? = null, init: Carousel.() -> Unit? = null)

Creates a carousel component.

Properties

Link copied to clipboard

Determines if the transitions are animated.

Link copied to clipboard

Whether the carousel will automatically refresh when the number of child nodes change.

Link copied to clipboard

Whether the carousel will be automatically scrolled to the closest item border.

Link copied to clipboard

Specifies how much the user must drag the carousel in order for it to auto scroll to the next item.

Link copied to clipboard

Whether the selected item will be in the center of the carousel instead of the beginning.

Link copied to clipboard

A carousel direction.

Link copied to clipboard

Whether the carousel is disabled.

Link copied to clipboard

Whether the carousel should fill the whole screen.

Link copied to clipboard

The index of the item to show on start.

Link copied to clipboard
val itemCount: dynamic

A dynamic property returning the number of carousel items.

Link copied to clipboard
var itemHeight: <Error class: unknown class>?

The item height (only for vertical direction).

Link copied to clipboard
var itemWidth: <Error class: unknown class>?

The item width (only for horizontal direction).

Link copied to clipboard

Whether the carousel should scroll past first and last items.

Link copied to clipboard

Determines if the carousel can be scrolled by drag or swipe.

Link copied to clipboard
val swiperPanel: <Error class: unknown class>

The swiper inner container.

Functions

Link copied to clipboard
open fun add(child: <Error class: unknown class>)
open fun add(position: Int, child: <Error class: unknown class>)
Link copied to clipboard
open fun addAll(children: List<<Error class: unknown class>>)
Link copied to clipboard
open fun afterInsert(node: <Error class: unknown class>)
Link copied to clipboard
open fun buildAttributeSet(attributeSetBuilder: <Error class: unknown class>)
Link copied to clipboard
fun Carousel.carouselItem(content: String? = null, rich: Boolean = false, align: <Error class: unknown class>? = null, className: String? = null, init: CarouselItem.() -> Unit? = null): CarouselItem

DSL builder extension function.

Link copied to clipboard
open fun dispose()
Link copied to clipboard
open fun disposeAll()
Link copied to clipboard
open fun first(options: dynamic = undefined): <Error class: unknown class><Unit>

Shows first carousel item.

Link copied to clipboard

Gets the active item index.

Link copied to clipboard
open fun getChildren(): List<<Error class: unknown class>>
Link copied to clipboard
open fun last(options: dynamic = undefined): <Error class: unknown class><Unit>

Shows last carousel item.

Link copied to clipboard
open fun next(options: dynamic = undefined): <Error class: unknown class><Unit>

Shows next carousel item.

Link copied to clipboard
open fun onSwipe(callback: (ratio: Number) -> Unit)

Sets swipe event listener.

Link copied to clipboard
open fun onSwipeClear()

Clears swipe event listener.

Link copied to clipboard
open fun prev(options: dynamic = undefined): <Error class: unknown class><Unit>

Shows previous carousel item.

Link copied to clipboard
open fun refreshCarousel()

Updates the layout of the carousel.

Link copied to clipboard
open fun remove(child: <Error class: unknown class>)
Link copied to clipboard
open fun removeAll()
Link copied to clipboard
open fun removeAt(position: Int)
Link copied to clipboard
open fun render(): <Error class: unknown class>
Link copied to clipboard
open fun setActiveIndex(index: Int, options: dynamic = undefined): <Error class: unknown class><Unit>?

Shows specified carousel item.