I am looking to achieve a specific behavior with one of my react components when a user scrolls down a page. I want the component to reach the top of the page and stay there without moving any further up.
Here is an Imgur link to the 'intranet' app I am building: https://i.sstatic.net/uq5e2.jpg
In the image provided, the component outlined with a thick red border should remain fixed at the top of the page as the user scrolls, with some margin. I have tried using the position property but I do not want it to be static; I just want it to not scroll past the top of the page.
I have come across other similar questions, but none that address this specific issue directly - please correct me if I am mistaken.