JSFiddle - React, Tailwind, and code Playground
by TJ VanToll
HTML
<script src="http://code.jquery.com/jquery-1.8.2.js"></script>
<link href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" rel="stylesheet" />
<script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script>
<div id="container">
<div id="resizable" />
</div>
CSS
#container {
position: relative;
width: 350px;
height: 300px;
border: 1px solid black;
}
#resizable {
top: 50px;
left: 50px;
background: #cec;
height: 100px;
width: 200px;
border: 1px dotted gray;
}
.ui-resizable-handle {
width: 8px;
height: 8px;
border: 1px solid rgb(128, 128, 128);
background: rgb(242, 242, 242);
}
.ui-resizable-n, .ui-resizable-s {
left: 45%;
}
.ui-resizable-e, .ui-resizable-w {
top: 45%;
}
.ui-resizable-se {
bottom: -5px;
right: -5px;
}
JavaScript
$("#resizable").resizable({
handles: 'ne, nw, se, sw',
containment: 'parent',
aspectRatio: true
});