I have a header in react that I want to have no shadow when the scrollbar position is initial (0), and on scroll, to have a shadow. Here is the code to the header with and without a shadow using tailwindCSS:
With shadow:
<header className="sticky left-0 top-0 right-0 z-20 shadow">...</header>
Without shadow:
<header className="sticky left-0 top-0 right-0 z-20">...</header>
How can I check if the scrollbar is not in its initial position to make the header take the className "shadow"?