Skip to main content
Version: 1.1.0

ICarouselItemsProps

@spartanfx/react v1.1.0


@spartanfx/react / index / ICarouselItemsProps

Interface: ICarouselItemsProps<T>

Props for items-driven mode where the carousel manages its own items.

Extends

  • ICarouselBaseProps

Type Parameters

T

T = unknown

The type of data in each carousel item

Properties

PropertyTypeDescriptionInherited from
ariaLabel?stringAccessible label for the carousel region.ICarouselBaseProps.ariaLabel
autoPlay?boolean | IAutoPlayConfigAuto-play configuration. Pass true for defaults or an object for custom config.ICarouselBaseProps.autoPlay
className?stringAdditional CSS class for the carousel container.ICarouselBaseProps.className
currentIndex?numberControlled current index. When provided, the carousel becomes controlled.ICarouselBaseProps.currentIndex
initialIndex?numberInitial slide index to display. Default 0ICarouselBaseProps.initialIndex
itemsICarouselItem<T>[]Array of items to display in the carousel.-
keyboardNavigation?booleanWhether to enable keyboard navigation. Default trueICarouselBaseProps.keyboardNavigation
maxWidth?string | numberMaximum width of the carousel container. Can be any valid CSS value (e.g., '800px', '100%', '50rem'). The carousel will be centered when maxWidth is set.ICarouselBaseProps.maxWidth
navigation?INavigationConfigNavigation configuration.ICarouselBaseProps.navigation
onIndexChange?(index) => voidCallback fired when the active slide changes.ICarouselBaseProps.onIndexChange
renderItem(item, index, isActive) => ReactNodeRender function for each item.-
style?CSSPropertiesAdditional inline styles for the carousel container.ICarouselBaseProps.style
swipeThreshold?numberMinimum swipe distance in pixels to trigger navigation. Default 50ICarouselBaseProps.swipeThreshold
touchEnabled?booleanWhether to enable touch/swipe gestures. Default trueICarouselBaseProps.touchEnabled
transition?ITransitionConfigTransition animation configuration.ICarouselBaseProps.transition