JSFiddle - React, Tailwind, and code Playground

by amitaviv99

HTML

<div id="canvas"></div>

JavaScript

var canvas = Raphael(document.getElementById("canvas"), 250, 250);
                                                 
var rect = canvas.rect(1, 1, 50, 50);
rect.attr({'fill': 'black'});

rect.transform("t20, 20");

hoverFunc = function() {
    rect.animate({transform: "...s1.6,1.6"}, 1000, 'bounce', );
};
hideFunc = function() {
    rect.animate({transform: "...s0.625,0.625"}, 1000, 'bounce');      
};
rect.hover(hoverFunc, hideFunc);