JSFiddle - React, Tailwind, and code Playground

HTML

<button id="open">open</button>
<button id="close">close</button>
<div id="textselector-body">
    a<br/>
    b<br/>
    c<br/>
</div>

CSS

#textselector-body{
    width:400px;
    height:auto;
    border:1px #000 solid;
    margin:0;
    padding:0;
    overflow:hidden;
}

JavaScript

$(function(){
    $("#open, #close").click(function(e){
        $("#textselector-body")[e.target.id=='open'?'slideDown':'slideUp'](2000);
    });
});