CarouselState

constructor(currentItem: Int = 0, @FloatRange(from = -0.5, to = 0.5) currentItemOffsetFraction: Float = 0.0f, itemCount: () -> Int)

Parameters

currentItem

the current item to be scrolled to.

currentItemOffsetFraction

the offset of the current item as a fraction of the item's size. This should vary between -0.5 and 0.5 and indicates how to offset the current item from the snapped position.

itemCount

the number of items this Carousel will have.