JSFiddle - React, Tailwind, and code Playground

HTML

<input type="file" id="fileInput" />
<div>name:<span id="name"></span></div>
<div>type:<span id="type"></span></div>

JavaScript

$(function(){
    $("#fileInput").on("change", function(e){
        $("#name").html(e.target.files[0].name);
        $("#type").html(e.target.files[0].type);
    });
});