Hide your header until you need it.
This fork fixes how the package incorrectly states whether it's a CJS or ESM package, leading to runtime errors when using Vite 8 because rolldown guesses incorrectly.
http://kyleamathews.github.io/react-headroom
npm install react-headroom
A simple example, see the docs site for more examples and documentation.
<Headroom>
<h1>You can put anything you'd like inside the Headroom Component</h1>
</Headroom>