> For the complete documentation index, see [llms.txt](https://docs.facephi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.facephi.com/docs.facephi-en/sdks/sdk-web/componentes/file-uploader-cargador-de-archivos/eventos/uploadwidgetloaded.md).

# uploadWidgetLoaded

## Details

It is emitted when the component finishes initializing.

**Event:** `uploadWidgetLoaded`

**Type:** `FacephiFileUploaderWidgetCustomEvent<UploadWidgetLoadedDetail>` | `CustomEvent<UploadWidgetLoadedDetail>`

### Syntax

```typescript
uploader.addEventListener('uploadWidgetLoaded', onUploadWidgetLoaded);
```

### Received object

The payload is of type `UploadWidgetLoadedDetail` and is in `event.detail`:

* `eventType` (`string`): Type of emitted event.
* `widgetConfiguration` (`object`): Effective widget configuration.
  * `maxFiles` (`number`): Maximum number of allowed files.
  * `maxFileSize` (`number`): Maximum size per file in bytes.

## Description

Indicates that the widget is ready. Useful for hiding loading screens or running logic dependent on mounting.

***

## Example

```jsx
<facephi-file-uploader-widget
    onUploadWidgetLoaded={(event) => {
      const { widgetConfiguration } = event.detail;
      console.log('Max files:', widgetConfiguration.maxFiles);
    }}
/>
```

```typescript
import { type UploadWidgetLoadedDetail } from '@facephi/sdk-web-wc';

uploader.addEventListener('uploadWidgetLoaded', (event) => {
  const detail: UploadWidgetLoadedDetail = event.detail;
});
```
