File Input
File upload trigger with dropzone support and validation.
Generated from the package's public source.
API
FileInputFileItemPropsinterface
Props
class?stringindexnumber— Index of the file in the list.style?string | CSSProperties
children: Element
FileInputFileListPropsinterface
Props
class?stringstyle?string | CSSProperties
children: Element | (file: File, index: () => number) => Element
FileInputFileRemovePropsinterface
Props
class?stringindex?number— Index of the file to remove. If omitted, uses FileItem context.style?string | CSSProperties
children: Element
FileInputHiddenInputPropsinterface
Props
class?string
FileInputRootPropsinterface
Props
accept?string[]— Accepted MIME types (e.g. 'image/*', 'application/pdf').class?stringdisabled?boolean— Whether the file input is disabled.files?File[]— Controlled file list.id?string— Element id.invalid?boolean— Whether the field is invalid.maxFiles?number— Maximum number of files.maxFileSize?number— Maximum file size in bytes.multiple?boolean— Whether multiple files can be selected.name?string— Form field name.onFilesChange?(files: File[]) => void— Called when the file list changes.onReject?(files: File[], reasons: string[]) => void— Called when files are rejected during validation.required?boolean— Whether the field is required.style?string | CSSProperties
children: Element
FileInputTriggerPropsinterface
Props
class?stringstyle?string | CSSProperties
children: Element
FileItemcomponent
FileItem(props: FileInputFileItemProps): Element
Props
class?stringindexnumber— Index of the file in the list.style?string | CSSProperties
children: Element
FileListcomponent
FileList(props: FileInputFileListProps): Element
Props
class?stringstyle?string | CSSProperties
children: Element | (file: File, index: () => number) => Element
FileRemovecomponent
FileRemove(props: FileInputFileRemoveProps): Element
Props
class?stringindex?number— Index of the file to remove. If omitted, uses FileItem context.style?string | CSSProperties
children: Element
HiddenInputcomponent
HiddenInput(props: FileInputHiddenInputProps): Element
Props
class?string
Rootcomponent
Root(props: FileInputRootProps): Element
Props
accept?string[]— Accepted MIME types (e.g. 'image/*', 'application/pdf').class?stringdisabled?boolean— Whether the file input is disabled.files?File[]— Controlled file list.id?string— Element id.invalid?boolean— Whether the field is invalid.maxFiles?number— Maximum number of files.maxFileSize?number— Maximum file size in bytes.multiple?boolean— Whether multiple files can be selected.name?string— Form field name.onFilesChange?(files: File[]) => void— Called when the file list changes.onReject?(files: File[], reasons: string[]) => void— Called when files are rejected during validation.required?boolean— Whether the field is required.style?string | CSSProperties
children: Element
Triggercomponent
Trigger(props: FileInputTriggerProps): Element
Props
class?stringstyle?string | CSSProperties
children: Element