primitives icon indicating copy to clipboard operation
primitives copied to clipboard

[New Primitive] `FileUpload`

Open colmtuite opened this issue 3 years ago • 25 comments

Feature request

Overview

The native <input type="file"> is not customisable. To get around this, I often see people doing:

<label>
  <button>
  <input type="file" style="hide this element visually">
</label>

However, this approach doesn't render the filename, which is bad for a11y. Rendering the filename requires JS

Who does this impact? Who is this for?

Anyone who wants custom UI and uses forms, which is quite a lot of people.

Additional context

We could also provide a part to render the filesize (which I think is available through the browser API).

Examples

https://baseweb.design/components/file-uploader

colmtuite avatar Apr 13 '22 10:04 colmtuite

A good example of use cases can be found on Uber's base web component lib

asherccohen avatar May 31 '22 10:05 asherccohen

Is there any movement on this?

hjonasson avatar Apr 05 '23 04:04 hjonasson

Is there any movement on this?

No we haven't started any work on this specific primitive.

benoitgrelard avatar Apr 13 '23 14:04 benoitgrelard

would be a great addition.

musdotdigital avatar Apr 30 '23 10:04 musdotdigital

Can't wait for this (:

vermeerenmaxime avatar Jun 07 '23 16:06 vermeerenmaxime

This is definitely needed.

Dannymx avatar Oct 11 '23 05:10 Dannymx

This would be a great addition. Can't wait for this.

pipifix avatar Nov 17 '23 17:11 pipifix

Really useful component, would be a greate addition fr. letss go

ederbiason avatar Nov 25 '23 19:11 ederbiason

+1 🙏

dexhorthy avatar Dec 08 '23 00:12 dexhorthy

+2 🙏🏻

demarchenac avatar Dec 12 '23 13:12 demarchenac

+1 🙏🏼

rinorzk avatar Dec 14 '23 15:12 rinorzk

+1 🙏

samantha-wong avatar Dec 21 '23 10:12 samantha-wong

+1

trocoli96 avatar Jan 03 '24 11:01 trocoli96

This would be super helpful 👍 +1

bittercoder avatar Jan 05 '24 07:01 bittercoder

This would be super helpful +1

spencer-rafada avatar Jan 18 '24 05:01 spencer-rafada

+1

ereburg avatar Jan 18 '24 13:01 ereburg

+1

MaxRojas1990 avatar Feb 14 '24 16:02 MaxRojas1990

+1

rbrahier17 avatar Feb 23 '24 09:02 rbrahier17

Another example is https://ark-ui.com/docs/components/file-upload based on https://zagjs.com/components/react/file-upload

jlarmstrongiv avatar Mar 01 '24 22:03 jlarmstrongiv

is there any update on this ?

kevin1193 avatar Apr 17 '24 15:04 kevin1193