4

Is it possible to use the react native SafeAreaView (react-native-safe-area-context) only horizontally (or remove the generated top padding)? When using it e.g. in a modal that slides from the bottom, the iPhone X spacing is added on the top although it's actually far away from the screen top. It should only add the necessary spacings to the left and right in landscape.

Dion
  • 3,145
  • 20
  • 37

1 Answers1

8

Does using the edges prop work for you?

<SafeAreaView edges={['left', 'right']} />

You can add bottom to the above array if you want it removed from the top only.

Dan
  • 8,041
  • 8
  • 41
  • 72