JSFiddle - React, Tailwind, and code Playground
HTML
<div class="limit">
<div class="content">
<h1 class="resizable">Navbar example</h1>
<p class="resizable">This example is a quick exercise to illustrate how the default, static navbar and fixed to top navbar work. It includes the responsive CSS and HTML, so it also adapts to your viewport and device.</p>
</div>
</div>
CSS
.limit{
width: 600px;
background: yellow;
border: 1px solid gray;
}
.content{
width:500px;
margin: 18px;
padding:10px;
background: orange;
}
.resizable{
width: 300px;
border: 1px solid red;
}
JavaScript
$(".resizable").resizable({
containment: '.limit',
handles: "n, e, s, w"
});