---
title: "ModalBottomSheetProperties"
description: "Properties used to customize the behavior of a [ModalBottomSheet]."
type: "class"
---

<div class='type'>Class</div>


<a id='references'></a>

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


```kotlin
@ExperimentalMaterial3Api
expect class ModalBottomSheetProperties(
    shouldDismissOnBackPress: Boolean = true,
    shouldDismissOnClickOutside: Boolean = true,
)
```


Properties used to customize the behavior of a `ModalBottomSheet`.

#### Parameters

| | |
| --- | --- |
| shouldDismissOnBackPress | Whether the modal bottom sheet can be dismissed by pressing the back button. If true, pressing the back button will call onDismissRequest. |
| shouldDismissOnClickOutside | Whether the modal bottom sheet can be dismissed by clicking on the scrim. |



## Properties

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


```kotlin
val shouldDismissOnBackPress: Boolean
```


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


```kotlin
val shouldDismissOnClickOutside: Boolean
```


<div class='sourceset sourceset-android'>Android</div>


```kotlin
@ExperimentalMaterial3Api
actual class ModalBottomSheetProperties
```


Properties used to customize the behavior of a `ModalBottomSheet`.

#### Parameters

| | |
| --- | --- |
| securePolicy | Policy for setting `WindowManager.LayoutParams.FLAG_SECURE` on the bottom sheet's window. |
| shouldDismissOnBackPress | Whether the modal bottom sheet can be dismissed by pressing the back button. If true, pressing the back button will call onDismissRequest. |



## Secondary Constructors

```kotlin
constructor() {
    this.securePolicy = SecureFlagPolicy.Inherit
    this.shouldDismissOnBackPress = true
    this.shouldDismissOnClickOutside = true
    this.isAppearanceLightStatusBars = null
    this.isAppearanceLightNavigationBars = null
}
```


Properties used to customize the behavior of a `ModalBottomSheet`.

This constructor provides default behavior for `ModalBottomSheet`. See other constructors for
customization options.


```kotlin
actual constructor(shouldDismissOnBackPress: Boolean, shouldDismissOnClickOutside: Boolean) {
    this.securePolicy = SecureFlagPolicy.Inherit
    this.shouldDismissOnBackPress = shouldDismissOnBackPress
    this.shouldDismissOnClickOutside = shouldDismissOnClickOutside
    this.isAppearanceLightNavigationBars = null
    this.isAppearanceLightStatusBars = null
}
```

```kotlin
constructor(
    securePolicy: SecureFlagPolicy = SecureFlagPolicy.Inherit,
    shouldDismissOnBackPress: Boolean = true,
    shouldDismissOnClickOutside: Boolean = true,
) {
    this.securePolicy = securePolicy
    this.shouldDismissOnBackPress = shouldDismissOnBackPress
    this.shouldDismissOnClickOutside = shouldDismissOnClickOutside
    this.isAppearanceLightNavigationBars = null
    this.isAppearanceLightStatusBars = null
}
```


Properties used to customize the behavior of a `ModalBottomSheet`.

#### Parameters

| | |
| --- | --- |
| securePolicy | Policy for setting `WindowManager.LayoutParams.FLAG_SECURE` on the bottom sheet's window. |
| shouldDismissOnBackPress | Whether the modal bottom sheet can be dismissed by pressing the back button. If true, pressing the back button will call onDismissRequest. |
| shouldDismissOnClickOutside | Whether the modal bottom sheet can be dismissed by clicking on the scrim. |



```kotlin
constructor(
    isAppearanceLightStatusBars: Boolean,
    isAppearanceLightNavigationBars: Boolean,
    securePolicy: SecureFlagPolicy = SecureFlagPolicy.Inherit,
    shouldDismissOnBackPress: Boolean = true,
    shouldDismissOnClickOutside: Boolean = true,
) {
    this.shouldDismissOnBackPress = shouldDismissOnBackPress
    this.shouldDismissOnClickOutside = shouldDismissOnClickOutside
    this.securePolicy = securePolicy
    this.isAppearanceLightStatusBars = isAppearanceLightStatusBars
    this.isAppearanceLightNavigationBars = isAppearanceLightNavigationBars
}
```


Properties used to customize the behavior of a `ModalBottomSheet`.

Use this constructor to customize the behavior of status and navigation bars on the
`ModalBottomSheet` window.

#### Parameters

| | |
| --- | --- |
| isAppearanceLightStatusBars | If true, changes the foreground color of the status bars to light so that the items on the bar can be read clearly. If false, reverts to the default appearance. |
| isAppearanceLightNavigationBars | If true, changes the foreground color of the navigation bars to light so that the items on the bar can be read clearly. If false, reverts to the default appearance. |
| securePolicy | Policy for setting `WindowManager.LayoutParams.FLAG_SECURE` on the bottom sheet's window. |
| shouldDismissOnBackPress | Whether the modal bottom sheet can be dismissed by pressing the back button. If true, pressing the back button will call onDismissRequest. |
| shouldDismissOnClickOutside | Whether the modal bottom sheet can be dismissed by clicking on the scrim. |



## Properties

<div class='sourceset sourceset-android'>Android</div>


```kotlin
val securePolicy: SecureFlagPolicy
```


<div class='sourceset sourceset-android'>Android</div>


```kotlin
actual val shouldDismissOnBackPress: Boolean
```


<div class='sourceset sourceset-android'>Android</div>


```kotlin
actual val shouldDismissOnClickOutside: Boolean
```



