<h2 id="foreach-action">forEach</h2>

<div class='sourceset sourceset-common'>Common</div>

```kotlin
@ExperimentalMaterial3AdaptiveApi
inline fun <Role : PaneScaffoldRole> PaneScaffoldMotionDataProvider<Role>.forEach(
    action: (Role, PaneMotionData) -> Unit
)
```

Perform actions on each [PaneMotionData](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/classes/PaneMotionData), in the left-to-right order of the panes in the
scaffold.

#### Parameters

| | |
| --- | --- |
| action | action to perform on each [PaneMotionData](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/classes/PaneMotionData). |