clipScrollableContainer

Compose Modifier

Common
fun Modifier.clipScrollableContainer(orientation: Orientation) =
    then(
        if (orientation == Orientation.Vertical) {
            Modifier.clip(VerticalScrollableClipShape)
        } else {
            Modifier.clip(HorizontalScrollableClipShape)
        }
    )

Clips bounds of scrollable container on main axis while leaving space for background effects (like shadows) on cross axis.

Parameters

orientationorientation of the scrolling