FileButton
Open file picker with a button click
Import
Source
Docs
Package
Usage
Multiple files
Set multiple prop to allow picking multiple files:
Reset file
resetRef should be used to fix issue with stale value on hidden input element as input type file cannot be controlled.
Call resetRef when user selection is cleared:
Incompatible with server components
FileButton is not compatible with React server components as it requires function as children. To use FileButton add "use client;" at the top of the file.