JSFiddle - React, Tailwind, and code Playground

by Sergey Denisov

HTML

<input id="testInput"/>
<button id="testButton" onclick="testFunction();">Press me!</button>

JavaScript

function testFunction() {
    var input = document.getElementById("testInput");
    var button = document.getElementById("testButton");

    input.style.transition = "box-shadow 1ms";
    input.addEventListener('transitionend', function() {
        input.style.transition = "box-shadow 5s";
        input.style.boxShadow = "0px 0px 0px #000000";
    }, false);
    input.style.boxShadow = "0px 0px 5px #ff0000";
    //input.focus();
}