JSFiddle - React, Tailwind, and code Playground

HTML

<div id="box">
<div id="bar"></div>
<div id="circle"></div>
    </div>

CSS

#box {
    width: 150px;
    height: 150px;
    border: 1px solid black;
    position: relative;
}

#bar {
    width: 0px;
    height: 25px;
    background-color: blue;
    position: absolute;
    top:30px;
    left:0;
}

#circle {
    width: 25px;
    height: 25px;
    background-color:red;
    border-radius: 30px;
    position:absolute;
    top: 30px;
    left: 40px;
}

JavaScript

var myFx = new Fx.Tween($('bar'), {
    duration: '500ms',
    transition: 'sine:out',
    link: 'chain'
});

myFx.start('width', '50').chain(
    function() { alert('hi!'); },
    function() { myFx.start('width', '200'); }
    );