JSFiddle - React, Tailwind, and code Playground

HTML

<div class="wipe" style="position: relative; top: 0; left: 0; background-color: lightblue; width: 300px; height: 50px;">
            &nbsp;
    </div>

JavaScript

wipe_left($('.wipe'), $('.wipe').css('width'));

    function wipe_left (elem, width) {
            elem.css('width', '0px');
            elem.css("right", width);
            elem.animate({
                width: width,
                left: '0px'
            }, 500);
        }