KMarquee
A seamless infinite scrolling marquee container.
This component scrolls its content continuously in a specified direction. It is ideal for tickers, news feeds, or showcasing a list of logos/items that should loop forever.
Example usage:
KMarquee(
direction = KMarqueeDirection.FORWARD,
velocity = 40.dp,
spacing = 20.dp
) {
Row(verticalAlignment = Alignment.CenterVertically) {
repeat(10) { index ->
Text("Item $index", modifier = Modifier.padding(horizontal = 8.dp))
Icon(Icons.Default.Star, null)
}
}
}Parameters
Applied to the outer layout wrapper.
Controls the scroll direction (KMarqueeDirection.FORWARD or KMarqueeDirection.BACKWARD).
Base speed in Dp per second.
Minimum gap between duplicate items during loop.
Number of item duplicates to render to guarantee continuous coverage.
Pauses animation when user holds down/taps the component.
Renders soft gradient fades at start and end edges.
Color for the edge fade gradients (typically matches screen background).
Width of the edge fade gradient overlays.
Slot layout to render inside the ticker.