'How to get resize preview boundary before resizing drawer

I am working on making a div resize-able through a draggable handle. I am using Mouse event listener to achieve this functionality by following this solution. But however I would like show the preview boundary or something like outline before resizing the div, Is there any way to achieve this?

Basically I am try to achieve this https://www.unodc.org/misc/treaties/ext/examples/resizable/basic.html, One of the basic example that uses floating handles, it show's boundary on mouse-move events and the resizes it after. Is there a css property or something that I can use and then add some sort of callback function when events ends to resize it.

Something like this demo here!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source