Composable Function

rememberCarouselState

Creates a CarouselState that is remembered across compositions.

rememberCarouselState

Source set: Common
@Composable
public fun rememberCarouselState(initialItem: Int = 0, itemCount: () -> Int): CarouselState

Creates a CarouselState that is remembered across compositions.

Parameters

initialItem The initial item that should be scrolled to.
itemCount The number of items this Carousel will have.
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: