KwikImageCarousel

fun KwikImageCarousel(modifier: Modifier = Modifier, state: MutableState<KwikCarouselState>, images: List<Any>, initialIndex: Int = 0, showIndicators: Boolean = true, showNavigation: Boolean = true, userScrollEnabled: Boolean = true, showCounter: Boolean = true, selectedIndicatorColor: Color = Color.White, unselectedIndicatorColor: Color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.5f), indicatorContainerColor: Color = MaterialTheme.colorScheme.surface.copy(alpha = 0.5f), autoPlay: Boolean = false, autoPlayDelay: Long = 4000, onPageIndexChange: (Int) -> Unit = {}, shape: Shape = MaterialTheme.shapes.large, prevButton: @Composable () -> Unit? = null, nextButton: @Composable () -> Unit? = null, onClick: () -> Unit = {}, contentScale: ContentScale = ContentScale.Crop)

An image carousel that builds on top of KwikCarousel.

Parameters

modifier

The modifier to be applied to the carousel.

images

The list of images to display in the carousel.

initialIndex

The index of the item to display first.

showIndicators

Whether to show the page indicators.

showNavigation

Whether to show the navigation buttons.

userScrollEnabled

Whether the carousel is scrollable by the user.

showCounter

Whether to show the counter.

selectedIndicatorColor

The color of the selected page indicator.

unselectedIndicatorColor

The color of the unselected page indicator.

indicatorContainerColor

The color of the indicator container.

autoPlay

Whether to automatically slide the images.

autoPlayDelay

The delay between auto-play slides in milliseconds.

onPageIndexChange

Callback that is invoked when the current page index changes.

shape

The shape of the carousel.

prevButton

Optional composable to replace the default previous button.

nextButton

Optional composable to replace the default next button.

onClick

Callback that is invoked when an image is clicked.

contentScale

The scale to apply to the image content.