UNPKG

ldx-widgets

Version:

widgets

111 lines (81 loc) 1.74 kB
[<< Component Index](../README.md) # [FileInput](https://github.com/tmfi/ldx-web-utilities/blob/develop/src/components/file_input.coffee) File input component for file uploads ### openAlertModal **`Function`** _Required_ Handler used for opening the alert modal widget to display error messages --- ### onChange **`Function`** _Optional_ Event handler fired after on or more files are selected. Fires in an Async manner for images to check dimensions --- ### onFileRemove **`Function`** _Optional_ Event handler fired when a file is removed from the input --- ### wrapperClass **`String`** _Optional_ CSS class that wraps the component --- ### className **`String`** _Optional_ CSS class on the input element itself --- ### multiple **`Boolean`** _Optional_ Multiple file input --- ### chooseFileText **`String`** _Optional_ Placeholder text for the 'Choose' button --- ### removeFileText **`String`** _Optional_ Placeholder text for the 'Remove' button --- ### name **`String`** _Required_ Name attribute for the input element --- ### maxSize **`Number`** _Optional_ The maximum size in bytes for a file --- ### resolution **`Object`** _Optional_ Only applicable to image files. Enforces minimum and maximum length and width for images. ``` resolution: max: h: null w: null min: h: null w: null ``` --- ### disabled **`Boolean`** _Optional_ Disables the input element --- ### displayFilename **`Boolean`** _Optional_ Toggle the display of the filename --- ### uploadProgress **`Object|String|Number`** _Optional_ Tracks the upload progress of the file with the associated `name` prop