JSFiddle - React, Tailwind, and code Playground
HTML
<div id="file_wrap">
<div id="button">Выбрать файл
<input type="file" id="file" />
</div>
</div>
CSS
#file_wrap {
display: inline-block;
position: relative;
overflow: hidden;
}
#file {
position: absolute;
top: 0px;
right: 0px;
width: 100%;
height: 100%;
opacity: 0;
margin: 0px;
padding: 0px;
cursor: pointer;
}
#button {
background: #f1f1f1;
border: 1px solid #cccccc;
font-size: 12px;
font-family: tahoma;
padding: 6px;
position: relative;
}
#button:hover {
background: #f00!important;
}