Nordcraft Package
File Picker
A controlled file picker component with two visual variants, live previews, full per-file metadata, accept/size/count validation, and separate success and rejection event streams.
Components, Formula and Actions SummaryCOMPONENTS
File Picker (exported) The picker component. Two variants — default and dropzone. Controlled file-list, previews, validation via readFiles, fan-out to File List / Rejected Files / File Type Error / Input Error.
Middle Truncated Text (internal) Middle-truncates file names by measured pixel width. Referenced in File Picker's File
Preview Title slot.
tooltip (internal) Shows the "File size more than N MB" bubble on oversized entries. Referenced in File Picker's preview icon.
ACTIONS
readFiles (exported) Reads a file input, validates against accept/size/count, fires onSuccess (accepted, fully read) and onRejected (with reasons) independently.
fileTypeParser (exported) Parses accepted-file-types into a sentence, an accept string, and per-token detail. Fires onParsed and onError.
FORMULAS
fileCategories (exported) Maps a mixed list of extensions, MIME types, and wildcards to the categories they belong to. Used in dropzone icon conditions.
arrayRemove (exported) Removes one item from an array by a key match. Used by both delete handlers to update file_list.
File Picker (exported) The picker component. Two variants — default and dropzone. Controlled file-list, previews, validation via readFiles, fan-out to File List / Rejected Files / File Type Error / Input Error.
Middle Truncated Text (internal) Middle-truncates file names by measured pixel width. Referenced in File Picker's File
Preview Title slot.
tooltip (internal) Shows the "File size more than N MB" bubble on oversized entries. Referenced in File Picker's preview icon.
ACTIONS
readFiles (exported) Reads a file input, validates against accept/size/count, fires onSuccess (accepted, fully read) and onRejected (with reasons) independently.
fileTypeParser (exported) Parses accepted-file-types into a sentence, an accept string, and per-token detail. Fires onParsed and onError.
FORMULAS
fileCategories (exported) Maps a mixed list of extensions, MIME types, and wildcards to the categories they belong to. Used in dropzone icon conditions.
arrayRemove (exported) Removes one item from an array by a key match. Used by both delete handlers to update file_list.
Drop your files here or click to select (Max 3)
All file types accepted. (2MB max each)