JSFiddle - React, Tailwind, and code Playground
HTML
<div id='container' style='border: solid 1px black; position: absolute; margin: 1em; width: 200px; height: 200px'></div>
CSS
.el {
-webkit-transform-origin: bottom left;
-webkit-transform: rotate(90deg);
-moz-transform-origin: bottom left;
-moz-transform: rotate(90deg);
}
JavaScript
var container = $("<div class='el' style='position: absolute; left: 10px; top: 10px;'></div>");
container.append($('<span>Hello World</span>'));
container.draggable({
containment: 'parent'
});
$('#container').append(container);