Base UI (Angular) file-upload (Pro) is a dropzone, button, or input that stores File[] through ControlValueAccessor. Copy it in with a license; disabled and error states match the forms kit. It does not upload to a server — you send the files from your submit handler.
Install with npx base-ui-cli add file-upload.
Unlock it plus 90 pro blocks, widgets & layouts — $99 one-time. Lifetime updates, 14-day money-back guarantee.
This is the default variant. It mimics a standard input field allowing users to see the name of the selected file.
For designs that require a trigger button, use the button variant. It integrates seamlessly with the Base UI button color and style tokens.
The dropzone variant creates a large, dashed interactive area. It automatically handles drag-and-drop mechanics and visually updates when dragging files overhead. When files are selected, a more icon button appears next to the count — click it to open a popover listing each file with its size and a remove button.
Drop files here to upload
or click to browse
The default label is empty until files are chosen. Bind [(ngModel)] for File[]. Disable the control while an upload is in flight.
No file chosen
Uploading…
or click to browse
Site-wide VPAT-style notes live on the accessibility report.
Run the following command to add this component to your project:
npx base-ui-cli add file-upload
For AI agents
Copy a prompt with the registry name, CLI install, and import — or add the Base UI MCP server.
npx -y base-ui-mcp
Base UI provides standalone components. Import the exact elements you want to use into your component.
// Install: npx base-ui-cli add file-upload
// Paths are relative to aliases.components (default: src/app/components)
import { FileUploadComponent } from './file-upload/file-upload.component';
@Component({
selector: 'app-your-component',
imports: [
FileUploadComponent
],
template: `...`
})
export class YourComponent {} API for file-upload — generated from JSDoc in the library source.
| API | Member | Type | Default | Description |
|---|---|---|---|---|
base-file-upload | accept | string | '*/*' | The accepted file types (e.g. 'image/*', '.pdf'). Defaults to any file. |
base-file-upload | multiple | boolean | false | Whether multiple files can be selected at once. |
base-file-upload | disabled | boolean | false | Disables the file input and drag-and-drop zones. Also set by Angular Forms via `setDisabledState`. |
base-file-upload | variant | FileUploadVariant | 'input' | The visual presentation style of the uploader. |
base-file-upload | buttonColor | ButtonColor | 'primary' | Semantic color variant (only applies when variant is 'button'). |
base-file-upload | buttonVariant | FileUploadButtonVariant | 'stroked' | Solid or stroked styling (only applies when variant is 'button'). |
base-file-upload | label | string | 'Choose file' | Text label displayed on the button or input field. Used as the `aria-label` when variant is 'icon'. |
base-file-upload | (fileSelected) | File[] | — | Emitted when files are selected via dialog or drag-and-drop. |
base-file-upload | (fileRemoved) | File | — | Emitted when a single file is removed from the list. |
base-file-upload | (filesCleared) | void | — | Emitted when all files are cleared from the list. |
Content