JSFiddle - React, Tailwind, and code Playground

HTML

<div class="topMenu"></div>

SCROLL DOWN!

CSS

body {
    height:1600px;
}
.topMenu {
    display: none;
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    border-top: 1px solid #000;
    background: pink;
    z-index: 1;
}

JavaScript

$(document).scroll(function () {
    var y = $(this).scrollTop();
    if (y > 100) {
        $('.topMenu').fadeIn();
    } else {
        $('.topMenu').fadeOut();
    }

});