FileInput
Render an Astryx file input.
Astryx Props
JSON-safe FileInput props forwarded to Astryx.
Supported Astryx props include:
label(string; required): Accessible label for the file input.value(File or File[] or null; required): Currently selected file(s). Controlled component.onChange((files: File or File[] or null) => void; required): Callback fired when files are selected or removed.changeAction((files: File or File[] or null) => Promise<void>): Async change action (React 19 transitions pattern). Use for immediate upload on file selection.accept(string): Accepted file types. Uses the HTML accept attribute format (e.g. "image/*", ".pdf,.doc").isMultiple(boolean): Whether multiple files can be selected. When true, value and onChange use File[] instead of File.maxSize(number): Maximum file size in bytes. Files exceeding this are rejected with an error status.maxFiles(number): Maximum number of files (only applies when isMultiple is true).isLabelHidden(boolean): Visually hides the label while keeping it accessible to screen readers.description(string): Description text displayed between the label and input.isOptional(boolean): Displays an "Optional" indicator next to the label. Mutually exclusive with isRequired.isRequired(boolean): Displays a "Required" indicator next to the label and sets aria-required. Mutually exclusive with isOptional.isDisabled(boolean): Disables the input, preventing interaction and dimming the element.isLoading(boolean): Puts the input in a loading state, showing a spinner and setting aria-busy.placeholder(string): Placeholder text shown when no file is selected.mode('input' or 'dropzone'): Visual mode. 'input' is a compact inline style; 'dropzone' is a larger area with drag-and-drop support.status({type: 'error' or 'warning' or '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.labelTooltip(string): Tooltip text displayed in an info icon at the end of the label.
Props typed as React nodes, render functions, event handlers, refs, or StyleX styles are documented for Astryx parity but cannot be serialized directly from Python unless the wrapper adapts them.
See Astryx component docs: https://astryx.atmeta.com/components/FileInput.
Notes
The synchronized value contains file metadata only; file bytes are not sent to Python.
Functions
constructor__init__(*, label, value=None, multiple=False, disabled=False, accept=None, max_size=None, max_files=None, label_hidden=None, description=None, loading=None, placeholder=None, mode=None, status=None, **props) -> NoneparamlabelstrVisible or accessible label for the component.
paramvalueAny= NoneSynchronized component value.
parammultiplebool= FalseWhether multiple files can be selected.
paramdisabledbool= FalseWhether the component should render disabled.
paramacceptstr | None= NoneAccepted MIME types or file extensions.
parammax_sizeint | None= NoneMaximum file size in bytes.
parammax_filesint | None= NoneMaximum number of selected files.
paramlabel_hiddenbool | None= NoneWhether to visually hide the accessible label.
paramdescriptionstr | None= NoneHelper text displayed with the input.
paramloadingbool | None= NoneWhether to show the loading state.
paramplaceholderstr | None= NonePlaceholder text.
parammodestr | None= NoneCompact input or dropzone presentation.
paramstatusMapping[str, Any] | None= NoneValidation status record.
parampropsAny= {}Returns
None