stipsan/react-spring-bottom-sheet

Getting height of BottomSheet while transition

motto76 opened this issue · 1 comments

Hello,

is it possible to get the current height of the BottomSheet during resizing?

Background is:
I want to display a button always above the BottomSheet during a resize.
So far I get the current height only at the end of the transition.

The example in the documentation (at "height") also shows a height only at the end of the transition.

Hello, we have solved the problem as follows:

  1. css configuration of the button component with reference to '--rsbs-overlay-h' and '--rsbs-overlay-translate-y'
    bottom: (calc(var(--rsbs-overlay-h) - var(--rsbs-overlay-translate-y))
  2. defined the button as a sibling on the BottomSheet

Result:
When the bottom sheet is moved, the button moves as desired.