Renderless Svelte

Back to docs

Carousel

This component takes a list of items and index and will return the current index. It exposes functions to go the next or previous item as well as a way to jump to a specified index.

Property Description
items The array of items in the carousel
currentIndex The index of the currently displayed item
loop Flag indicating that the array should loop around, defaults to false
setIndex a function allowing the user to move immediately to a specified index
controls an object containing a next and a previous function

Examples

Squirrel 🐿️


Squirrel 🐿️