Skip to main content
These iOS-only modifiers present content over the current view — half-height sheets, full-screen covers, and Quick Look previews for files. Each is bound to a boolean (or URL) state and toggles presentation when that state changes. sheet and fullScreenCover are the two primary modal patterns. Combine sheet with presentationDetents to control sheet snap heights. quickLookPreview opens the system Quick Look UI for documents, images, and 3D models.

sheet

Presents a modal sheet over the current content.
object
required
Basic sheet
Sheet with dismiss callback
Sheet with detents Combine with presentationDetents to control the sheet’s available heights.

fullScreenCover

Presents a full-screen modal cover over the current content.
object
required
Configuration for the full-screen cover presentation.
Basic full-screen cover
With onDismiss callback
Unlike sheet, a full-screen cover takes over the entire screen and does not show a drag indicator. The user cannot dismiss it by swiping down — provide an explicit dismiss action (e.g., a button that sets isPresented to false).

presentationDetents

Sets the available sheet size detents (snap points) for a presented sheet.
PresentationDetents
required
An array of detent configurations that define the available sheet heights. Each detent is a PresentationDetent object with a detentType property.Use the Detent convenience constructors:
  • Detent.medium — half-screen height
  • Detent.large — full-screen height
  • Detent.fraction(value) — fraction of screen height (0 to 1)
  • Detent.height(value) — exact height in points
Medium and large detents
Custom fraction detent
Fixed height detent
Apply .presentationDetents() to the same component that has the .sheet() modifier. When multiple detents are provided, the user can drag between them. If only one detent is provided, the sheet snaps to that height and cannot be resized.

quickLookPreview

Presents a Quick Look preview for a file URL.
object
required
Single file preview
Multi-file preview
Quick Look supports many file types including images, PDFs, 3D models, and documents. The preview is presented modally and dismissed by the user or by setting the URL to null.

See also