Skip to main content

Carousel Mode Config

modeConfig.carousel controls item sizing, navigation, indicators, looping, and auto-play behavior in carousel mode.

content: {
mode: 'carousel',
modeConfig: {
carousel: {
itemWidth: 300,
gap: 16,
showArrows: true,
showIndicators: true,
infinite: true,
},
},
item: { fields: […], layout: { type: 'auto' } },
},

Options​

OptionValuesDefaultEffect
itemWidthnumberunsetSets the width of each card.
itemHeightnumber, 'auto''auto'Sets the item height, or lets items grow naturally with auto.
gapnumberunsetSets spacing between carousel items.
showIndicatorstrue, falseunsetShows or hides dot indicators.
showArrowstrue, falseunsetShows or hides navigation arrows.
infinitetrue, falseunsetEnables looping at the ends.
revolvingtrue, falsetrue when infinite is enabledChanges how looping behaves when infinite is enabled.
autoPlaytrue, falseunsetEnables automatic slide advance.
autoPlayIntervalnumber (milliseconds)unsetSets the auto-play interval in milliseconds.
dragThresholdnumberunsetSets the drag distance needed to change slides.

Mode-Specific Caveats​

  • revolving only applies when infinite is enabled.
  • itemHeight: 'auto' can create variable card heights, which changes perceived slide rhythm.
  • Sorting (config.sorting) is not supported in carousel mode. Pre-sort your data before passing it in if a specific order is needed.

Coverage Summary​

Every carousel option is represented by at least one example on the Carousel Mode guide page:

  • itemWidth, itemHeight, gap, showIndicators, showArrows, infinite, revolving, dragThreshold: Manual Navigation, Auto-Playing Carousel
  • autoPlay, autoPlayInterval: Auto-Playing Carousel
  • groupings in carousel mode: Grouping

See Also​