React Native Bottom Sheet 1.0.0

v1.​0.​0Major Release

What’s changed

  • Renamed nativeOverlay to windowOverlay on ModalBottomSheet. The overlay behaves as before.
  • Changed settleDuration to milliseconds. The default is 450. Values below 10 trigger a development warning to help catch values still expressed in seconds.
  • Unified close requests on ModalBottomSheet. Scrim taps, screen reader dismiss actions, Android system back, and Escape on Android and the web all call onCloseRequest when supplied. The sheet stays in place until the handler changes its index. Dragging closed still reports through onIndexChange.
  • Added onCloseRequest support on iOS for scrim taps, the scrim’s Dismiss button, and the VoiceOver escape gesture.
  • Changed the default dismissal behavior. Without a handler, these requests snap the sheet to its closed detent and report through onIndexChange when the scrim is visible and the closed detent allows user interaction. Android back and Escape stay consumed through the closing animation. On the web, only the top modal receives Escape, even when it takes no action.
  • Added start and end to detent insets. They follow the layout direction and override the corresponding left or right inset. On the web, they use the document direction. Also fixed surfaceStyle start and end corner radii in right-to-left web documents.
  • Expanded scrimColor to accept any ColorValue, including PlatformColor and DynamicColorIOS.
  • Updated the wrapNativeView type to hide internal native props. Animated.createAnimatedComponent still works. Added the BottomSheetProviderProps type export.
  • Declared react-dom and react-native-web as optional peer dependencies.

Migrating from 0.18.1

  1. Rename nativeOverlay to windowOverlay and keep its value.
  2. Multiply explicit settleDuration values by 1,000. For example, change settleDuration={0.55} to settleDuration={550}.
  3. Review onCloseRequest handlers. To dismiss, set index to the closed detent in the handler. For example, if the closed detent is first, use onCloseRequest={() => setIndex(0)}.
  4. Review sheets without a handler. To keep one open on Android back or Escape, add a no-op onCloseRequest handler or mark the closed detent programmatic.
  5. If a wrapNativeView wrapper explicitly types its parameter with native props, use ComponentType<any> for that parameter.

View the 1.0.0 release on GitHub.

Release card
React Native Bottom Sheet 1.0.0 release card