---
title: "presentationDetents(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/presentationdetents(_:)"
---

# presentationDetents(_:)

Sets the available detents for the enclosing sheet.

## Declaration

```swift
nonisolated func presentationDetents(_ detents: Set<PresentationDetent>) -> some View

```

## Parameters

- `detents`: A set of supported detents for the sheet. If you provide more that one detent, people can drag the sheet to resize it.

## Discussion

Discussion By default, sheets support the large detent. struct ContentView: View {     @State private var showSettings = false

var body: some View {         Button("View Settings") {             showSettings = true         }         .sheet(isPresented: $showSettings) {             SettingsView()                 .presentationDetents([.medium, .large])         }     } }

## See Also

### Configuring a sheet’s height

- [presentationDetents(_:selection:)](swiftui/view/presentationdetents(_:selection:).md)
- [presentationContentInteraction(_:)](swiftui/view/presentationcontentinteraction(_:).md)
- [presentationDragIndicator(_:)](swiftui/view/presentationdragindicator(_:).md)
- [PresentationDetent](swiftui/presentationdetent.md)
- [CustomPresentationDetent](swiftui/custompresentationdetent.md)
- [PresentationContentInteraction](swiftui/presentationcontentinteraction.md)
