JSFiddle - React, Tailwind, and code Playground

HTML

<div class="block" id="1"><input id="block-1" value="3" type="text"></div>
<div class="block" id="2"><input id="block-2" value="3" type="text"></div>
<div class="block" id="3"><input id="block-3" value="3" type="text"></div>

JavaScript

$("input").mousedown(function(e) {
    var self = $(this);
    clearInterval(this.downTimer);
    this.downTimer = setInterval(function() {
      self.val(self.val() - 1);
    }, 200);
}).mouseup(function(e) {
    clearInterval(this.downTimer);
    var val = $(this).prop("defaultValue");
    $(this).val(val);
});