JSFiddle - React, Tailwind, and code Playground

by Yunus Gaziev

HTML

<div class="example"></div>
<input type="number" min="40" value="40" class="example-height">

CSS

.example {
    width: 120px;
    height: 40px;
    background: magenta;
    margin-bottom: 12px;
}

JavaScript

$(document).ready(function() {
    
    var example = $('.example'),
        exampleHeight = $('.example-height');

    exampleHeight.on('keyup change', function() {
        example.css({
            height: exampleHeight.val()
        });
    });
    
});