Skip to main content
The Modal component is a simple way to present content above an enclosing view.

Example

Props

boolean
Determines whether your modal is visible.
() => void
required
Called when the user taps the hardware back button on Android, dismisses the sheet using a gesture on iOS (when allowSwipeDismissal is set to true), or the menu button on Apple TV.Required on iOS and Android.
'none' | 'slide' | 'fade'
default:"'none'"
Controls how the modal animates:
  • 'slide' - Slides in from the bottom
  • 'fade' - Fades into view
  • 'none' - Appears without an animation
boolean
Determines whether your modal will fill the entire view. Setting this to true will render the modal over a transparent background.
() => void
Callback that is called once the modal has been shown.
ColorValue
Sets the background color of the modal’s container. Defaults to white if not provided and transparent is false. Ignored if transparent is true.

iOS-Specific Props

'fullScreen' | 'pageSheet' | 'formSheet' | 'overFullScreen'
Determines the style of modal to show.Platform: iOS
Array<'portrait' | 'portrait-upside-down' | 'landscape' | 'landscape-left' | 'landscape-right'>
Allowed orientations for the modal. On iOS, the modal is still restricted by what’s specified in your app’s Info.plist’s UISupportedInterfaceOrientations field.Platform: iOS
() => void
Callback that is called once the modal has been dismissed.Platform: iOS
(event: OrientationChangeEvent) => void
Called when the orientation changes while the modal is being displayed. The orientation provided is only ‘portrait’ or ‘landscape’.Platform: iOS
boolean
Controls whether the modal can be dismissed by swiping down on iOS. This requires you to implement the onRequestClose prop to handle the dismissal.Platform: iOS

Android-Specific Props

boolean
default:false
Controls whether to force hardware acceleration for the underlying window.Platform: Android
boolean
Determines whether your modal should go under the system status bar.Platform: Android
boolean
Determines whether your modal should go under the system navigation bar.Platform: Android

Presentation Styles (iOS)

fullScreen

The modal covers the entire screen. This is the default when transparent is false.

pageSheet

The modal covers the screen width but allows the previous view to be partially visible underneath (iPad only).

formSheet

The modal is displayed as a centered form that is smaller than the screen (iPad only).

overFullScreen

The modal covers the entire screen, but the underlying view is not removed. This is the default when transparent is true.

Important Notes

  • Internal state is not preserved when the modal is closed
  • The onRequestClose callback is required on Android and iOS
  • Modals can be nested, with the most recently mounted modal appearing on top
  • When using transparent={true}, you’re responsible for providing a background view
  • On iOS, onDismiss is called when the modal is dismissed through system gestures

Accessibility

Modal inherits all accessibility props from View. Make sure to:
  • Set accessibilityViewIsModal={true} to prevent interaction with views behind the modal
  • Provide appropriate accessibilityLabel for screen readers
  • Handle focus management when the modal opens and closes