This is a live demo of Docs, the Bootstrap 5 documentation template: search with Ctrl+K, switch to dark mode, copy a code block. Get it in the store →

API reference

Methods, properties and events of an Orbit instance.

Methods

MethodReturnsWhat it does
next()voidGo to the next slide.
prev()voidGo to the previous slide.
goTo(index)voidGo to the slide at index (from 0).
play() / pause()voidStart or stop autoplay.
update(options)voidChange options without rebuilding.
destroy()voidRemove Orbit and restore the markup.

Properties

PropertyTypeWhat it is
indexnumberThe current slide.
lengthnumberHow many slides there are.
optionsobjectThe options in use at the current width.

Events

js
slider.on('change', ({ index, previous }) => {
  console.log(`Moved from ${previous} to ${index}`)
})
EventWhen
readyOrbit has started.
changeThe current slide changed.
resizeA breakpoint was crossed.
destroyOrbit was removed.
Edit this pageLast updated 10 January 2027