# Scrim

Common/AllAndroid/JVM

## Functions summary

|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/material3/Scrim.composable#Scrim(kotlin.String,androidx.compose.ui.Modifier,kotlin.Function0,kotlin.Function0,androidx.compose.ui.graphics.Color)( contentDescription: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier, onClick: (() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)?, alpha: () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color )` A Scrim that obscures content behind a modal surface. | Cmn |

## Functions

### Scrim

Cmn Artifact: [androidx.compose.material3:material3](https://developer.android.com/jetpack/androidx/releases/compose-material3) [View Source](https://cs.android.com/search?q=file:androidx/compose/material3/Scrim.kt+function:Scrim)

```
@Composable
fun Scrim(
    contentDescription: String?,
    modifier: Modifier = Modifier,
    onClick: (() -> Unit)? = {},
    alpha: () -> Float = { 1f },
    color: Color = ScrimDefaults.color
): Unit
```

A Scrim that obscures content behind a modal surface.

| Parameters |
|---|---|
| `contentDescription: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | text used by accessibility services to describe what this Scrim can dismiss. This should always be provided unless the scrim is used for decorative purposes and `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Scrim(kotlin.String,androidx.compose.ui.Modifier,kotlin.Function0,kotlin.Function0,androidx.compose.ui.graphics.Color)` is null. |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | Optional `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier` for the scrim. |
| `onClick: (() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)? = {}` | Optional callback invoked when the user clicks on the scrim, if set to null, no click semantics are provided. |
| `alpha: () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = { 1f }` | Opacity to be applied to the `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Scrim(kotlin.String,androidx.compose.ui.Modifier,kotlin.Function0,kotlin.Function0,androidx.compose.ui.graphics.Color)` from 0.0f to 1.0f representing fully transparent to fully opaque respectively. This is always coerced between 0.0f and 1.0f. |
| `color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = ScrimDefaults.color` | The color of the scrim. This color must not be `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Unspecified()` for this scrim to be drawn. |