JSFiddle - React, Tailwind, and code Playground
HTML
<script src=" https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js"></script>
<ul class="apps">
<li>
<span class="delete">x</span>
1
</li>
<li>
<span class="delete">x</span>
2
</li>
<li>
<span class="delete">x</span>
3
</li>
</ul>
CSS
.apps {padding:10px;overflow:hidden;border:1px solid #000;}
.apps li {display:block;width:50px;height:50px;border:1px solid #000;float:left;margin:5px;position:relative;background:#ccc;}
.apps .delete {display:none;}
.apps li:hover {z-index:1;}
.apps li:hover .delete {display:block;text-indent:-9999;overflow:hidden;position:absolute;top:-10px;right:-10px;background:#000;width:20px;height:20px;cursor:default;}
JavaScript
$(".apps") // container holding sortable elements
// make it sortable
.sortable()
// add delete button behaviour
.delegate(".delete","click",function(e){
var btn = $(this)
, container = btn.closest(".apps")
, item = btn.closest("li")
// shrink animation
item.animate({
width: 0,
height: 0,
margin: 24
},function(){
// remove item from sortable.
item.remove();
// make sortable see that an item has been removed.
container.sortable("refresh");
});
});