---
title: "height(_:)"
framework: swiftui
role: symbol
role_heading: Type Method
path: "swiftui/presentationdetent/height(_:)"
---

# height(_:)

A custom detent with the specified height.

## Declaration

```swift
static func height(_ height: CGFloat) -> PresentationDetent
```

## See Also

### Creating custom detents

- [custom(_:)](swiftui/presentationdetent/custom(_:).md)
- [fraction(_:)](swiftui/presentationdetent/fraction(_:).md)
- [PresentationDetent.Context](swiftui/presentationdetent/context.md)
