JSFiddle - React, Tailwind, and code Playground

HTML

<div class="wrapper">
    Some content within a DIV
</div>

<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content here for scrolling purposes</p>
<p>Some content...

CSS

.wrapper {
    position: fixed;
    width:100%;
    display:block;
    height:175px;
    background-color: #e4f;
}

JavaScript

$(document).scroll(function(){
        if ($(this).scrollTop()>175){
            // animate fixed div to small size:
            $('.wrapper').stop().animate({ height: 90 , 'padding-top': 20},100);
        } else {
            //  animate fixed div to original size
            $('.wrapper').stop().animate({ height: 175, 'padding-top': 0},100);
        }
    });