# Dialog Sheet

### Overview

Dialog sheets provide a way to present content that needs user attention, such as forms, detailed information, or additional actions.

The `dialogSheet` modifier allows you to display a Material Design styled dialog sheet from any SwiftUI view. It lets you customize the content that appears in the dialog sheet.

To use the `dialogSheet` modifier, apply it to any View with the required parameters.&#x20;

### Modifer

Presents a  simple dialog sheet over the current view.

```swift
dialogSheet(isPresented: Binding<Bool>, _ content: @escaping () -> Content)
```

### Parameters

<table><thead><tr><th width="194">Property</th><th>Description</th></tr></thead><tbody><tr><td><code>isPresented</code></td><td>A <code>Binding&#x3C;Bool></code> to control the presentation state of the dialog sheet.</td></tr><tr><td><code>content</code></td><td>A closure returning the view content to be displayed in the dialog sheet.</td></tr></tbody></table>

### Example

```swift
@State private var showDialogSheet = false

var body: some View {
    Container {
        Switch("Show Dialog Sheet", isOn: $showDialogSheet)
    }
    .dialogSheet(isPresented: $showDialogSheet) {
        VStack(alignment: .leading, spacing: 15) {
            Text("Dialog Sheet")
                .font(MaterialUIKit.configuration.h4)
                .fontWeight(.bold)
            
            Text("It can contain any custom content.")
                .font(MaterialUIKit.configuration.h4)
        }
    }
}
```

<figure><picture><source srcset="https://2931569195-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHpwjDgYAa64eKF8AGmeE%2Fuploads%2FYOeWh2N8Brfzyb3PriGS%2FDialog%20Sheet%20Dark.png?alt=media&#x26;token=52b48137-d167-4f54-a741-ad076057734b" media="(prefers-color-scheme: dark)"><img src="https://2931569195-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHpwjDgYAa64eKF8AGmeE%2Fuploads%2F9iYjVVMgPd3tzeJQSIPL%2FDialog%20Sheet%20Light.png?alt=media&#x26;token=e0de4588-54d1-4f8e-b8cc-9850203c8fde" alt=""></picture><figcaption></figcaption></figure>
