Options
Every setting Orbit accepts, with its default.
All options
| Option | Type | Default | What it does |
|---|---|---|---|
perView | number | 1 | How many slides show at once. |
gap | number | 16 | Space between slides, in pixels. |
loop | boolean | false | Go back to the start after the last slide. |
autoplay | number | false | false | Milliseconds between slides. Pauses on hover and focus. |
arrows | boolean | true | Show previous and next buttons. |
dots | boolean | false | Show a button for each page. |
drag | boolean | true | Allow dragging with a mouse or a finger. |
speed | number | 400 | Length of the slide animation, in milliseconds. |
breakpoints | object | {} | Options to change at minimum widths. |
Autoplay
Autoplay waits for the user: it pauses while the slider is hovered or focused, and stops for anyone who prefers reduced motion.
js
new Orbit('#hero', { autoplay: 5000, loop: true })Use autoplay sparingly. Moving content can be hard to read. Always keep a visible pause control.
Breakpoints
Any option except breakpoints itself can change at a breakpoint. Orbit merges them from smallest to largest.