Compose Modifier

clipScrollableContainer

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

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Source set: Common

Added in 1.11.0-rc01

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

orientation orientation of the scrolling