Carousel

@Composable
fun Carousel(state: CarouselState, modifier: Modifier = Modifier, allowLongSwipes: Boolean = false, allowMouseDrag: Boolean = true, allowScrollWheel: Boolean = true, interactive: Boolean = true, revealDuration: Int = 0, scrollParams: SpringParams = DEFAULT_SPRING_PARAMS, spacing: Int = 0, onPageChange: (Int) -> Unit? = null, content: @Composable (page: Int) -> Unit)

Creates a org.gnome.adw.Carousel, a paginated scrolling widget.

Parameters

state

The shared CarouselState instance.

modifier

Compose Modifier for layout and styling.

allowLongSwipes

Whether swipes can navigate across multiple pages at once.

allowMouseDrag

Whether the carousel can be dragged with the mouse pointer.

allowScrollWheel

Enables scrolling between pages with the mouse wheel.

interactive

Whether the carousel can be navigated.

revealDuration

Duration in milliseconds for page transition animations.

scrollParams

The parameters for animating the carousel's scroll.

spacing

The space between each page.

onPageChange

Callback triggered when the current page changes.

content

Composable widget that represents the pages.