Fancy html file input customization using jquery fileStyle Plugin


Integrate Fancy html file input on your website


Include the fileStyle minified CSS jquery-filestyle.min.css and JS jquery-filestyle.min.js file on page don’t forget to include latest jquery library before fileStyle JS.

<link href="jquery-filestyle.min.css" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="jquery-filestyle.min.js"></script>


Create Plain fancy HTML file input element by simply calling jfilestyle() plugin function on page.

<input type="file" name="test" id="fileInput">
$(function() { $('#fileInput').jfilestyle() });

You can customize your HTML file input element by tow method 1). Using data attribute 2). Jquery function.

Customizing html file input using html data attribute.

<input type="file" class="fileInput" 

Customizing html file input via jquery plugin function

$(function() {   
  // button text
  'text': 'Choose file',
  // shows input field
  'input': true,
  // is disabled?
  'disabled': false,
  // where to place the button
  'buttonBefore': false,
  // input size
  'inputSize': '200px',
  // custom placeholder
  'placeholder': '',
  // enable drag and drop
  'dragdrop': true,
  // callback
  'onChange': function () {}

See live demo and download source code.


See official github repository for more information and follow for future updates. Don’t forget to read license for using above plugin in your commercial project.

Seraphinite AcceleratorOptimized by Seraphinite Accelerator
Turns on site high speed to be attractive for people and search engines.