---
title: Entrada de imatge
image: /images/user-guide/objects/objects.png
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import { SandpackEditor} from '@site/src/ui/SandpackEditor'
import imageInputCode from '!!raw-loader!@site/src/ui/input/components/imageInputCode.js'
Permet als usuaris pujar i eliminar una imatge.
```jsx
import { ImageInput } from "@/ui/input/components/ImageInput";
export const MyComponent = () => {
return ;
};
```
| Props | Tipus | Descripció |
| ------------ | ------- | ----------------------------------------------------------------------------------------------------------------- |
| fotografia | cadena | La URL de la font de la imatge |
| onUpload | funció | La funció que s'executa quan un usuari puja una imatge nova. Rep l'objecte `File` com a paràmetre |
| onRemove | funció | La funció que s'executa quan l'usuari clica el botó d'eliminar |
| onAbort | funció | The function called when a user clicks on the abort button during image upload |
| isUploading | boolean | Indica si una imatge s'està pujant actualment |
| errorMessage | cadena | Un missatge d'error opcional per mostrar sota l'entrada de la imatge |
| desactivat | boolean | If `true`, the entire input is disabled, and the buttons are not clickable |