```LazyRow( state = listState, modifier = ...
# compose-desktop
m
Copy code
LazyRow(
    state = listState,
    modifier = Modifier.fillMaxWidth().padding(50.dp, 0.dp)
        .pointerInput(Unit) {
            detectHorizontalDragGestures { _, dragAmount ->
                coroutineScope.launch {
                    if (dragAmount < 0) {//scroll right
                        listState.animateScrollToItem( listState.firstVisibleItemIndex+2)
                    } else if (dragAmount > 0) {//scroll left
                        listState.animateScrollToItem(listState.firstVisibleItemIndex -1)
                    }
                }
            }
        },
    horizontalArrangement = Arrangement.spacedBy(10.dp)
)
Here's how I did it