<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<h1>hTrixx Framework [ file input ]</h1>
<h3>Ignore the body and * class for your project</h3>
<hr>
<p>Select a color from here to preview</p>
<div class="btn-group">
<button onclick="changeColor(id)" id="aqua" class="btn " style="background-color:#2196F3;color:#fff">Aqua</button>
<button onclick="changeColor(id)" id="crimson" class="btn " style="background-color:crimson;color:#fff">Crimson</button>
<button onclick="changeColor(id)" id="black" class="btn " style="background-color:black;color:#fff">Black</button>
<button onclick="changeColor(id)" id="green" class="btn " style="background-color:#00E676;color:#fff">Green</button>
</div>
<p>You can also change the colors as you want in css</p>
<input class="file__upload" type="file" name="" id="file" hidden />
<label class="file__upload__label" for="file" id="selector">Select File</label>
var loader = function(e){
let file = e.target.files;
let show = "<span>Filename: </span>" + file[0].name;
let output = document.getElementById("selector");
output.innerHTML = show;
output.classList.add("label__active");
}
let fileInput = document.getElementById("file");
fileInput.addEventListener("change",loader);
//This part is for buttons to change the color of the file input
//You can copy just the top part if you don't want to change the colors
function changeColor(id){
$("#selector").removeClass();
$("#selector").addClass("file__upload__label").addClass(id);
}