material-components / material-components-web

Modular and customizable Material Design UI components for the web
https://material.io/develop/web
MIT License
17.15k stars 2.15k forks source link

Investigate how to support file input fields #61

Open traviskaufman opened 7 years ago

traviskaufman commented 7 years ago

Currently only text input fields will be styled. It would be great to support the styling of file input fields.

If you decide not to support this, than no styling should be done. Because currently it will be styled and the label is over the uplaod button.

input-type-file

Copied from https://github.com/google/material-design-lite/issues/1031

traviskaufman commented 7 years ago

@sgomes do we want to prioritize this?

sgomes commented 7 years ago

@traviskaufman Sounds useful. Should we run it by the designers first, to make sure this is a good pattern?

traviskaufman commented 7 years ago

@sgomes definitely; it needs design guidance for sure. I know that part of the design team is working on forms in general, and I've let them know about our considerations for file inputs, so they might be tackling this already.

acdvorak commented 7 years ago

It is unlikely that we will implement this any time soon (if ever), for a number of reasons:

  1. File inputs are not in the spec
  2. They're platform-specific (Web only)
  3. Working around the strict, constantly-shifting browser limitations on styling and interacting with file inputs is a time-consuming nightmare
  4. Other components that are used much more frequently are higher on our priority list
BlkPingu commented 5 years ago

Any news on this?

lborgman commented 4 years ago

I assume people working on PWA:s really need this. Any news?

zodiacfireworks commented 4 years ago

After four years ... Any news?

lborgman commented 4 years ago

I guess that what most people are doing now is making an <input type="file"> with opacity: 0 and putting that over something shown to the user. Why not support that? It can't be much work, or?

andrewlevada commented 4 years ago

Hm.. Don't think that 'design-guidance' is really needed. It would be nice to be able to simply change \<button> to \<input> and have all beautiful material styles apply just like to a normal button. (I commonly change \<button> for \<a> tag and it works fine, hope same is possible for \<input>)