Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to apply a material design to file input tag?

I'm designing a website using google's material design lite, in my home page I have a file input tag

    <input type="file">

the problem is that I can't find the appropriate mdl classes for styling this element

like image 567
Ali HS Avatar asked Mar 04 '17 19:03

Ali HS


Video Answer


1 Answers

Here is an example to give you an idea:

<style>#file { display: none; }</style>
<label class="mdl-button mdl-js-button mdl-button--icon mdl-button--file">
  <i class="material-icons">attach_file</i><input type="file" id="file">
</label>

It uses a MDL icon as a button for the user to click to pull up the file input prompt.

like image 69
andrew Avatar answered Oct 16 '22 07:10

andrew