<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/PresentationDetent",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI18PresentationDetentV"
  },
  "title" : "PresentationDetent"
}
-->

# PresentationDetent

A type that represents a height where a sheet naturally rests.

```
struct PresentationDetent
```

## Topics

### Getting built-in detents

[`large`](/documentation/SwiftUI/PresentationDetent/large)

The system detent for a sheet at full height.

[`medium`](/documentation/SwiftUI/PresentationDetent/medium)

The system detent for a sheet that’s approximately half the height of
the screen, and is inactive in compact height.

### Creating custom detents

[`custom(_:)`](/documentation/SwiftUI/PresentationDetent/custom(_:))

A custom detent with a calculated height.

[`fraction(_:)`](/documentation/SwiftUI/PresentationDetent/fraction(_:))

A custom detent with the specified fractional height.

[`height(_:)`](/documentation/SwiftUI/PresentationDetent/height(_:))

A custom detent with the specified height.

[`PresentationDetent.Context`](/documentation/SwiftUI/PresentationDetent/Context)

Information that you use to calculate the presentation’s height.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)