Detents & Drag Indicators
Resize sheets with presentation detents.
What Are Detents?
A detent is a stopping height a sheet can rest at, like half-open or full. They let users resize the sheet by dragging it. 📏
The presentationDetents Modifier
Add presentationDetents inside the sheet content to list the heights it can snap to. Pass a set of detents to enable resizing.
.presentationDetents([.medium, .large])All lessons in this course
- Presenting a Sheet
- Detents & Drag Indicators
- Alerts with Actions
- Confirmation Dialogs