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



Shows a transient `ConfirmationDialog` with an icon and optional very short `curvedText`. The
length of the curved text should be very short and should not exceed 1-2 words. If a longer text
is required, then the alternative `ConfirmationDialog` overload with slot for linear text should
be used instead.

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



<h2 id="confirmationdialog-visible-ondismissrequest-curvedtext-modifier-colors-properties-durationmillis-content">ConfirmationDialog</h2>

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


```kotlin
@Composable
public fun ConfirmationDialog(
    visible: Boolean,
    onDismissRequest: () -> Unit,
    curvedText: (CurvedScope.() -> Unit)?,
    modifier: Modifier = Modifier,
    colors: ConfirmationDialogColors = ConfirmationDialogDefaults.colors(),
    properties: DialogProperties = DialogProperties(),
    durationMillis: Long = ConfirmationDialogDefaults.DurationMillis,
    content: @Composable () -> Unit,
): Unit
```


#### Parameters

| | |
| --- | --- |
| visible | A boolean indicating whether the confirmation dialog should be displayed. |
| onDismissRequest | A lambda function to be called when the dialog is dismissed - either by swiping right or when the `durationMillis` has passed. Implementation of this lambda must remove the dialog from the composition hierarchy e.g. by setting `visible` to false. |
| curvedText | A slot for displaying curved text content which will be shown along the bottom edge of the dialog. We recommend using `confirmationDialogCurvedText` for this parameter, which will give the default sweep angle and padding. |
| modifier | Modifier to be applied to the confirmation content. |
| colors | A `ConfirmationDialogColors` object for customizing the colors used in this `ConfirmationDialog`. |
| properties | An optional `DialogProperties` object for configuring the dialog's behavior. |
| durationMillis | The duration in milliseconds for which the dialog is displayed. This value will be adjusted by the accessibility manager according to the content displayed. |
| content | A slot for displaying an icon inside the confirmation dialog. It's recommended to set its size to `ConfirmationDialogDefaults.IconSize` |






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


<h2 id="confirmationdialog-visible-ondismissrequest-text-modifier-colors-properties-durationmillis-content">ConfirmationDialog</h2>

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


```kotlin
@Composable
public fun ConfirmationDialog(
    visible: Boolean,
    onDismissRequest: () -> Unit,
    text: @Composable (ColumnScope.() -> Unit)?,
    modifier: Modifier = Modifier,
    colors: ConfirmationDialogColors = ConfirmationDialogDefaults.colors(),
    properties: DialogProperties = DialogProperties(),
    durationMillis: Long = ConfirmationDialogDefaults.DurationMillis,
    content: @Composable () -> Unit,
)
```


#### Parameters

| | |
| --- | --- |
| visible | A boolean indicating whether the confirmation dialog should be displayed. |
| onDismissRequest | A lambda function to be called when the dialog is dismissed - either by swiping right or when the `durationMillis` has passed. Implementation of this lambda must remove the dialog from the composition hierarchy e.g. by setting `visible` to false. |
| text | A slot for displaying text below the icon. It should not exceed 3 lines. |
| modifier | Modifier to be applied to the confirmation content. |
| colors | A `ConfirmationDialogColors` object for customizing the colors used in this `ConfirmationDialog`. |
| properties | An optional `DialogProperties` object for configuring the dialog's behavior. |
| durationMillis | The duration in milliseconds for which the dialog is displayed. This value will be adjusted by the accessibility manager according to the content displayed. |
| content | A slot for displaying an icon inside the confirmation dialog, which can be animated. It's recommended to set its size to `ConfirmationDialogDefaults.SmallIconSize` |