Skip to main content
Version: 1.1.0

ICarouselControlledProps

@spartanfx/react v1.1.0


@spartanfx/react / index / ICarouselControlledProps

Interface: ICarouselControlledProps

Props for controlled/navigation-only mode where rendering is delegated to parent.

Extends

  • ICarouselBaseProps

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
children(currentIndex) => ReactNodeRender function that receives the current index and returns the slide content.-
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
itemCountnumberTotal number of slides 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
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