Sheet Placement
Sets the placement of a presentation within the presenting view. This may fall back to center on small screens.
Platform Compatibility
Tags
SwiftUI Code
@State var showSheet = true
var body: some View {
Text("Foo")
.sheet(isPresented: $showSheet) {
sheetContent
.presentationPlacement(.leading)
}
}Found an issue or have a suggestion?
More Sheet Components
View allDisable Sheet Dismiss Swipe
Conditionally prevents interactive dismissal of presentations like popovers, sheets, and inspectors. Dragging the sheet is still possible to a limited extent, as shown in the screenshot, but it will never be dismissed.
Page Screen Sheet Size
On devices smaller than a page of paper, such as iPhone, Apple Watch, and 8" or 11" iPads, the sheet fills the entire height and, unlike the default sheet on iPad, the full width. On macOS, .page behaves like .fitted.
Fitted Sheet Sizing
Sets the sizing of the containing presentation. This does not have any effect on smaller devices like iPhone and Apple Watch. On macOS, fitted is the default.
Prioritize Sheet Content Scrolling
Configures the behavior of swipe gestures on a presentation. PresentationContentInteraction.scrolls prioritizes scrolling the content over resizing the sheet.
Sheet Background Interaction
Controls whether people can interact with the view behind a presentation.
Sheet Background
Sets the presentation background of the enclosing sheet using a shape style.
Explore Other Components
Browse allText Format
Creates a text view that displays the formatted representation of a nonstring type supported by a corresponding format style.
Current Value Gauge
Creates a gauge showing a value within a range and that describes the gauge’s purpose and current value
TabsPickerStyle
A picker style that presents options as segmented tabs. On macOS, this style produces a segmented picker with a visual treatment that distinguishes tab navigation from value selection. On iOS, tvOS, and visionOS, the visual appearance matches that of the standard standard .segmented style. On all supported platforms, VoiceOver announces options as tabs.
ViewThatFits Vertical
A view that adapts to the available vertical space by providing the first child view that fits.