<div class='type'>Composable Component</div>



`Dialog` displays a full-screen dialog, layered over any other content. It takes a single slot,
which is expected to be an opinionated Wear dialog content, such as `Alert` or `Confirmation`.

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



<h2 id="dialog-showdialog-ondismissrequest-modifier-scrollstate-properties-content">Dialog</h2>

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


```kotlin
@Composable
public fun Dialog(
    showDialog: Boolean,
    onDismissRequest: () -> Unit,
    modifier: Modifier = Modifier,
    scrollState: ScalingLazyListState? = rememberScalingLazyListState(),
    properties: DialogProperties = DialogProperties(),
    content: @Composable () -> Unit,
)
```


#### Parameters

| | |
| --- | --- |
| showDialog | Controls whether to display the `Dialog`. Set to true initially to trigger an 'intro' animation and display the `Dialog`. Subsequently, setting to false triggers an 'outro' animation, then `Dialog` hides itself. |
| onDismissRequest | Executes when the user dismisses the dialog. Must remove the dialog from the composition. |
| modifier | Modifier to be applied to the dialog. |
| scrollState | The scroll state for the dialog so that the scroll position can be displayed. |
| properties | Typically platform specific properties to further configure the dialog. |
| content | Slot for dialog content such as `Alert` or `Confirmation`. |




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


> **Deprecated** This overload is provided for backwards compatibility with Compose for Wear OS 1.1.A newer overload is available which uses ScalingLazyListState from wear.compose.foundation.lazy package



<hr class="docs-overload-divider">


<h2 id="dialog-showdialog-ondismissrequest-modifier-scrollstate-properties-content-2">Dialog</h2>

```kotlin
@Composable
public fun Dialog(
    showDialog: Boolean,
    onDismissRequest: () -> Unit,
    modifier: Modifier = Modifier,
    scrollState: androidx.wear.compose.material.ScalingLazyListState? =
        androidx.wear.compose.material.rememberScalingLazyListState(),
    properties: DialogProperties = DialogProperties(),
    content: @Composable () -> Unit,
)
```


#### Parameters

| | |
| --- | --- |
| showDialog | Controls whether to display the `Dialog`. Set to true initially to trigger an 'intro' animation and display the `Dialog`. Subsequently, setting to false triggers an 'outro' animation, then `Dialog` hides itself. |
| onDismissRequest | Executes when the user dismisses the dialog. Must remove the dialog from the composition. |
| modifier | Modifier to be applied to the dialog. |
| scrollState | The scroll state for the dialog so that the scroll position can be displayed. |
| properties | Typically platform specific properties to further configure the dialog. |
| content | Slot for dialog content such as `Alert` or `Confirmation`. |