> For the complete documentation index, see [llms.txt](https://swift-packages.gitbook.io/materialuikit/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://swift-packages.gitbook.io/materialuikit/components/dialog-sheet.md).

# Dialog Sheet

Represents a Material UI styled modal sheet for presenting supplementary content or actions.

### 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="/files/8CIvrQGheUcvdpu5LVjf" 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&amp;token=e0de4588-54d1-4f8e-b8cc-9850203c8fde" alt=""></picture><figcaption></figcaption></figure>
