react-snowfall icon indicating copy to clipboard operation
react-snowfall copied to clipboard

Snow animation does not continue beyond screen height

Open nureka-rodrigo opened this issue 1 year ago • 1 comments

The current implementation of the snow animation component only renders within the bounds of the screen height. The animation disappears after scrolling past the screen height. This behaviour limits the user experience and doesn't provide the desired effect of a continuous snow animation. Extend the functionality of the animation, so that it continues beyond the screen height, regardless of scroll position.

nureka-rodrigo avatar Mar 05 '24 16:03 nureka-rodrigo

You can try:

<Snowfall
      style={{
          position: 'fixed',
          zIndex: '9999999',
      }}
      ...
 />

TuTinh avatar Jun 03 '24 09:06 TuTinh

@TuTinh is right, the snowfall animation will continue as far down as the element goes. You just need to make sure it is large enough to cover the entire scrollable content. If you have any issues with this please let me know, happy to take a look at a reproduction.

Note you might need to increase the snowflake count based on the screen height to make sure you still have a sufficient snowflake density while scrolling down

cahilfoley avatar Sep 06 '24 09:09 cahilfoley