The Modal component is a simple way to present content above an enclosing view.
Note: If you need more control over how to present modals over the rest of your app, then consider using a top-level Navigator.
animationType prop instead.
animationType prop controls how the modal animates.
slideslides in from the bottom
fadefades into view
noneappears without an animation
Default is set to
onRequestClose callback is called when the user taps the hardware back button on Android or the menu button on Apple TV.
onShow prop allows passing a function that will be called once the modal has been shown.
transparent prop determines whether your modal will fill the entire view. Setting this to
true will render the modal over a transparent background.
visible prop determines whether your modal is visible.
hardwareAccelerated prop controls whether to force hardware acceleration for the underlying window.
onOrientationChange callback is called when the orientation changes while the modal is being displayed.
The orientation provided is only 'portrait' or 'landscape'. This callback is also called on initial render, regardless of the current orientation.
presentationStyle prop controls how the modal appears (generally on larger devices such as iPad or plus-sized iPhones).
See https://developer.apple.com/reference/uikit/uimodalpresentationstyle for details.
fullScreencovers the screen completely
pageSheetcovers portrait-width view centered (only on larger devices)
formSheetcovers narrow-width view centered (only on larger devices)
overFullScreencovers the screen completely, but allows transparency
Default is set to
fullScreen depending on
supportedOrientations prop allows the modal to be rotated to any of the specified orientations.
On iOS, the modal is still restricted by what's specified in your app's Info.plist's UISupportedInterfaceOrientations field.
formSheet, this property will be ignored by iOS.
Improve this page by sending a pull request!