# `PhoenixKitWeb.Components.Core.FileUpload`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v1.7.87/lib/phoenix_kit_web/components/core/file_upload.ex#L1)

Reusable file upload component for PhoenixKit.

Provides a simple file upload button with auto-upload functionality.
Files are uploaded immediately upon selection without requiring a submit button.

## Usage

    <.file_upload
      upload={@uploads.media_files}
      label="Upload Media"
    />

## Attributes

- `upload` (required) - LiveView upload config from allow_upload/3
- `label` (optional) - Button label (default: "Upload Files")
- `icon` (optional) - Icon name (default: "hero-cloud-arrow-up")
- `accept_description` (optional) - Text describing accepted file types
- `max_size_description` (optional) - Text describing max file size

# `file_upload`

## Attributes

* `upload` (`:any`) (required)
* `label` (`:string`) - Defaults to `"Upload Files"`.
* `icon` (`:string`) - Defaults to `"hero-cloud-arrow-up"`.
* `accept_description` (`:string`) - Defaults to `nil`.
* `max_size_description` (`:string`) - Defaults to `nil`.
* `uploaded_file_ids` (`:list`) - List of file IDs from last upload (for external use). Defaults to `nil`.
* `variant` (`:string`) - Display variant - 'full' for drag-drop zone, 'button' for simple button only. Defaults to `"full"`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
