Composable Function

LevitatedPaneScrim

The default scrim implementation shown with a levitated pane to block the user interaction from the underlying layout.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free

LevitatedPaneScrim

Common
@ExperimentalMaterial3AdaptiveApi
@Composable
fun LevitatedPaneScrim(
    modifier: Modifier = Modifier,
    onClick: (() -> Unit) = LevitatedPaneScrimDefaults.onClickAction,
    color: Color = LevitatedPaneScrimDefaults.Color,
)

The default scrim implementation shown with a levitated pane to block the user interaction from the underlying layout. See AdaptStrategy.Levitate for more detailed info.

Parameters

modifier the additional modifiers to apply to the scrim; note that we will set up the size, color, and clicking behavior of the scrim via default modifiers, and custom modifiers provided here might interfere with the default behavior.
onClick the on-click listener of the scrim; usually used to dismiss the levitated pane; i.e. remove the pane from the top of the destination history. By default this will be an empty lambda, which simply blocks the user interaction from the underlying layout.
color the color of scrim, by default if Color.Unspecified is provided, the pane scaffold implementation will use a translucent black color.