Files
twenty/packages/twenty-docs/l/ca/twenty-ui/input/image-input.mdx
T
github-actions[bot] 8cadd00d34 i18n - translations (#15799)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-11-13 16:34:00 +01:00

43 lines
1.9 KiB
Plaintext

---
title: Entrada de imatge
image: /images/user-guide/objects/objects.png
---
<Frame>
<img src="/images/user-guide/objects/objects.png" alt="Header" />
</Frame>
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.
<Tabs>
<Tab title="Usage">
```jsx
import { ImageInput } from "@/ui/input/components/ImageInput";
export const MyComponent = () => {
return <ImageInput/>;
};
```
</Tab>
<Tab title="Props">
| 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 |
</Tab>
</Tabs>