label | string · requiredAccessible label for the file input. |
|---|
value | File | File[] | null · requiredCurrently selected file(s). Controlled component. |
|---|
onChange | (files: File | File[] | null) => void · requiredCallback fired when files are selected or removed. |
|---|
changeAction | (files: File | File[] | null) => Promise<void>Async change action (React 19 transitions pattern). Use for immediate upload on file selection. |
|---|
accept | stringAccepted file types. Uses the HTML accept attribute format (e.g. "image/*", ".pdf,.doc"). |
|---|
isMultiple | boolean · default falseWhether multiple files can be selected. When true, value and onChange use File[] instead of File. |
|---|
maxSize | numberMaximum file size in bytes. Files exceeding this are rejected with an error status. |
|---|
maxFiles | numberMaximum number of files (only applies when isMultiple is true). |
|---|
isLabelHidden | boolean · default falseVisually hides the label while keeping it accessible to screen readers. |
|---|
description | stringDescription text displayed between the label and input. |
|---|
isOptional | boolean · default falseDisplays an "Optional" indicator next to the label. Mutually exclusive with isRequired. |
|---|
isRequired | boolean · default falseDisplays a "Required" indicator next to the label and adds a screen-reader-only "Required" description to the trigger (assistive tech does not reliably announce aria-required on the trigger). Mutually exclusive with isOptional. |
|---|
isDisabled | boolean · default falseDisables the input, preventing interaction and dimming the element. |
|---|
disabledMessage | stringExplains why the input is disabled. With isDisabled, shows a tooltip on hover/keyboard focus and keeps the trigger focusable via aria-disabled (opening the file picker stays blocked). Use this instead of wrapping a disabled FileInput in Tooltip; disabled controls swallow the hover events an external Tooltip needs. |
|---|
isLoading | boolean · default falsePuts the input in a loading state, showing a spinner and setting aria-busy. |
|---|
placeholder | string · default "Choose file" or "Choose files"Placeholder text shown when no file is selected. |
|---|
mode | 'input' | 'dropzone' · default 'input'Visual mode. 'input' is a compact inline style; 'dropzone' is a larger area with drag-and-drop support. |
|---|
status | {type: 'error' | 'warning' | 'success', message?: string}Validation status: applies a colored border. If message is provided, displays a floating message below the input. Error type also sets aria-invalid. |
|---|
statusVariant | 'attached' | 'detached' | 'tooltip' · default 'attached'How the status message is placed relative to the input. attached overlaps directly below the input (bordered treatment); detached floats below as a separate element with spacing; tooltip hides the message box and surfaces it in a tooltip on the status icon. |
|---|
labelTooltip | stringTooltip text displayed in an info icon at the end of the label. |
|---|
width | SizeValueWidth of the field (number = pixels, string used as-is, e.g. "100%"). Sizes the whole field (label, control, and status) so they stay aligned. |
|---|