Package-level declarations
Types
Link copied to clipboard
data class KwikCarouselState(val itemCount: Int, var initialIndex: Int = 0, var currentIndex: Int = initialIndex, var loop: Boolean = false)
The state of the carousel
Functions
Link copied to clipboard
fun KwikCarousel(modifier: Modifier = Modifier, state: MutableState<KwikCarouselState>, shape: Shape = MaterialTheme.shapes.medium, initialIndex: Int = 0, showIndicators: Boolean = true, selectedIndicatorColor: Color = Color.White, unselectedIndicatorColor: Color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.5f), indicatorContainerColor: Color = MaterialTheme.colorScheme.surface.copy(alpha = 0.5f), showNavigation: Boolean = true, userScrollEnabled: Boolean = true, showCounter: Boolean = false, autoPlay: Boolean = false, autoPlayDelay: Long = 3000, onPageIndexChange: (Int) -> Unit = {}, prevButton: @Composable () -> Unit? = null, nextButton: @Composable () -> Unit? = null, contentBuilder: @Composable (page: Int) -> Unit)
A generic carousel that displays a list of content in a horizontal scrollable view.
Link copied to clipboard
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.
Link copied to clipboard
Slide to the next page
Link copied to clipboard
Slide to the previous page
Link copied to clipboard
State holder for the carousel
Link copied to clipboard
Slide to a specific page