JSFiddle - React, Tailwind, and code Playground

HTML

<div id="parent">
    <div id="top">...</div>
    <div id="spring">SPROING!!</div>
    <div id="bottom">...</div>
</div>

CSS

#parent {
    height: 300px;
    background: #eee;
}

#top, #bottom {
    height: 50px;
    background: #ddd;
}

#spring {
    background: #ccc;
}

JavaScript

var leftover = $('#parent').height() - $('#top').height() - $('#bottom').height();
$('#spring').height(leftover);