Skip to main content
‹ Modals
Options

Options

The options of modals.

SectionModalsDraftDocumented, not reviewed yet: the API can change.

Options​

Every key, with the platforms it works on. A dashed platform means the key does nothing there.

8 options shown

modalModalOptions

A screen shown as a modal: how it is presented, how it can be dismissed, its sheet.

iOSiPadOSAndroid
sheetOptionsModalSheet

The settings of a sheet: its stops, dimming, handle, scrolling and corners.

iOSiPadOSAndroidShowcase 7.2 ›
contentSizeOptionsModalContentSize

The size of a form sheet or a popover on iPad and Mac.

iOSiPadOSAndroid (not supported)Showcase 7.4 ›
popoverOptionsModalPopover

The source and the arrow of a popover.

iOSiPadOSAndroid (not supported)Showcase 7.5 ›
testIDstring

The test identifier of the modal's container: on iOS the view of the root of the shown modal, on Android the modal's view in the layer of modals (for a sheet, the container of the sheet). The identifiers of the sheet's handle and of the dimming under it are <testID>.grabber and <testID>.scrim, on Android only: iOS gives no public way to name the system handle and dimming. The close button and the content of the screens have their own testID.

iOSiPadOSAndroid
swipeToDismissboolean= true

Whether the user may dismiss the modal by a gesture: a swipe down on a sheet, a tap on the dimming, a tap outside a popover. With false the modal stays and each attempt arrives as modalDismissAttempted. A full-screen modal can't be dismissed by a gesture anyway. The hold belongs to the screen that set it and ends when that screen leaves the modal or lifts the hold. Set by usePreventLeave through mergeOptions; apps don't set it.

iOSiPadOSAndroid
modalPresentationStyleOptionsModalPresentationStyle

How a modal is presented: full screen, as a page sheet, a form sheet, a popover…

iOSiPadOSAndroidShowcase 7.1 ›
modalTransitionStyleOptionsModalTransitionStyle

The system transition of a modal: cover vertical, flip horizontal, cross dissolve, partial curl.

iOSiPadOSAndroid (not supported)Showcase 7.1 ›
Generated from the types and their comments. Edit the source ↗