Skip to content

Snackbar renders relatively to the parent component instead of the bottom of the page #3913

@matewka

Description

@matewka

Current behaviour

I'm trying to render a Snackbar component at the bottom of the screen. I'm doing everything according to the documentation but the Snackbar always renders relatively to its parent.

Expected behaviour

Snackbar should render at the bottom of the screen, as explained in the documentation: https://callstack.github.io/react-native-paper/docs/components/Snackbar

How to reproduce?

This problem became so annoying to me that I've prepared a clean example repo for anyone to be able to reproduce:
https://github.com/matewka/rnp-snackbar-test.git

  1. Download the code, run npm i, npm start and run on your preferred device / simulator.
  2. Click on any of the buttons (red, green or blue) to display the Snackbar.

Preview

https://github.com/matewka/rnp-snackbar-test/raw/master/snackbar-example-video.mp4

Your Environment

software version
ios 16.2
android x
react-native 0.71.8
react-native-paper 5.8.0
node 18.12.1
npm or yarn 7.24.2
expo sdk 48

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions