JSFiddle - React, Tailwind, and code Playground

HTML

<div id="outer">
    <div>123</div>
    <div id="inner">Here are a couple more words...<br>here is another line.</div>
</div>

CSS

#outer {
    -moz-border-radius: 5px;
    border-radius: 5px;
    border: 1px solid #aaa;
    box-shadow: 0px 3px 2px rgba(0, 0, 0, 0.3);
    background-color: #f0f0f0;
}

#inner {
    height: 200px;
    background-color: #ff0000;
    overflow: hidden;
}

JavaScript

$(function() {
    $("#outer").click(function() {
        $("#outer").animate({height:20});
        $("#inner").animate({height:0});
    });
});