ICarouselControlledProps
@spartanfx/react / index / ICarouselControlledProps
Interface: ICarouselControlledProps
Props for controlled/navigation-only mode where rendering is delegated to parent.
Extends
ICarouselBaseProps
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
ariaLabel? | string | Accessible label for the carousel region. | ICarouselBaseProps.ariaLabel |
autoPlay? | boolean | IAutoPlayConfig | Auto-play configuration. Pass true for defaults or an object for custom config. | ICarouselBaseProps.autoPlay |
children | (currentIndex) => ReactNode | Render function that receives the current index and returns the slide content. | - |
className? | string | Additional CSS class for the carousel container. | ICarouselBaseProps.className |
currentIndex? | number | Controlled current index. When provided, the carousel becomes controlled. | ICarouselBaseProps.currentIndex |
initialIndex? | number | Initial slide index to display. Default 0 | ICarouselBaseProps.initialIndex |
itemCount | number | Total number of slides in the carousel. | - |
keyboardNavigation? | boolean | Whether to enable keyboard navigation. Default true | ICarouselBaseProps.keyboardNavigation |
maxWidth? | string | number | Maximum 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? | INavigationConfig | Navigation configuration. | ICarouselBaseProps.navigation |
onIndexChange? | (index) => void | Callback fired when the active slide changes. | ICarouselBaseProps.onIndexChange |
style? | CSSProperties | Additional inline styles for the carousel container. | ICarouselBaseProps.style |
swipeThreshold? | number | Minimum swipe distance in pixels to trigger navigation. Default 50 | ICarouselBaseProps.swipeThreshold |
touchEnabled? | boolean | Whether to enable touch/swipe gestures. Default true | ICarouselBaseProps.touchEnabled |
transition? | ITransitionConfig | Transition animation configuration. | ICarouselBaseProps.transition |