Package-level declarations

Types

Link copied to clipboard

Contains the default values used by Carousel.

Link copied to clipboard
sealed interface CarouselItemInfo

Interface to hold information about a Carousel item and its size.

Link copied to clipboard
sealed interface CarouselItemScope

Receiver scope for Carousel item content.

Link copied to clipboard
class CarouselState(currentItem: Int = 0, @FloatRange(from = -0.5, to = 0.5) currentItemOffsetFraction: Float = 0.0f, itemCount: () -> Int) : ScrollableState

The state that can be used to control all types of carousels.

Functions

Link copied to clipboard
@Composable
fun HorizontalMultiBrowseCarousel(state: CarouselState, preferredItemWidth: Dp, modifier: Modifier = Modifier, itemSpacing: Dp = 0.dp, flingBehavior: TargetedFlingBehavior = CarouselDefaults.singleAdvanceFlingBehavior(state = state), minSmallItemWidth: Dp = CarouselDefaults.MinSmallItemSize, maxSmallItemWidth: Dp = CarouselDefaults.MaxSmallItemSize, contentPadding: PaddingValues = PaddingValues(0.dp), content: @Composable CarouselItemScope.(itemIndex: Int) -> Unit)
Link copied to clipboard
@Composable
fun HorizontalUncontainedCarousel(state: CarouselState, itemWidth: Dp, modifier: Modifier = Modifier, itemSpacing: Dp = 0.dp, flingBehavior: TargetedFlingBehavior = CarouselDefaults.noSnapFlingBehavior(), contentPadding: PaddingValues = PaddingValues(0.dp), content: @Composable CarouselItemScope.(itemIndex: Int) -> Unit)
Link copied to clipboard
@Composable
fun rememberCarouselState(initialItem: Int = 0, itemCount: () -> Int): CarouselState

Creates a CarouselState that is remembered across compositions.