Small box with dropdown options after selecting file to upload

I’ve implemented an input element and after the file is selected for upload, I want to show a box with a dropdown like this. I’ve seen them on different sites but can’t seem to find a npm pacakge that does this.

Is this something which requires a custom component using the event.target.files object or does one already exist?

enter image description here