new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Mantine · all subjects

file-input/props

8 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

FileInput loading prop and loadingPosition

Set the `loading` prop to display a loading indicator on FileInput. By default, the loader is displayed on the right side of the input. Change the position with the `loadingPosition` prop to 'left' or 'right'. This is useful for async operations like API calls, searches, or validations.

FileInput controlled component with multiple files

When `multiple` is `true`, FileInput expects an array of File objects. Use useState with type `File[]` to manage the value and pass it via the `value` prop with `onChange` callback to handle updates.

FileInput uncontrolled usage with FormData

FileInput can be used with uncontrolled forms the same way as a native `input[type="file"]`. Set the `name` attribute to include the file input value in the FormData object on form submission. Use the `defaultValue` prop to control the initial value in uncontrolled forms.

FileInput multiple prop

Set `multiple` to true to allow the user to pick more than one file.

FileInput accept prop

Set the `accept` prop to restrict file selection to specific mime types.

FileInput clearable prop

Set the `clearable` prop to display a clear button in the right section of the input when a file is selected. If you define a custom right section, the clear button will not be rendered.

FileInput ref type

The ref type for FileInput is button.

FileInputProps generic type argument

FileInputProps is a generic interface that accepts a single type argument for the `multiple` value. Use `FileInputProps<false>` for single file selection and `FileInputProps<true>` for multiple file selection.

Give your agent this brain