JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<head>
<title></title>
</head>
<body>
<div id="container">
<div id="sidebar">
Sidebar
</div>
</div>
</body>
</html>
CSS
body {
background:#191919 url(http://pattern8.com/images/pattern-thumbs/pattern8-pattern-10b.png) repeat left top;
}
#container {
height: 3000px;
}
#sidebar {
background: black;
position: fixed;
right: 0;
top: 0;
width: 200px;
overflow: hidden;
}
JavaScript
$(function(){
var sidebarHeight = $(window).innerHeight();
$('#sidebar').css('height',sidebarHeight);
});