JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="https://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
<div id="parent">
    <div id="child">Child!</div>
</div>

CSS

#parent {
    position: relative;
    width: 200px;
    height: 200px;
    border: 1px solid black;
}
#child {
    position: absolute;
    width: 50px;
    height: 50px;
    margin: 20px;
    /*this breaks it */
    border: 1px solid red;
}

JavaScript

$("#child").resizable({ containment: 'parent' })