Form Field File Upload

A pre-composed form field that wraps a BbFileUpload control with automatic label, helper text, and error message display. Inherits from FormFieldBase, which provides EditContext integration, auto-generated control IDs, ARIA attribute wiring, and validation error state management.

Default

A basic FormFieldFileUpload with a label, helper text, and two-way binding via @bind-Files. The component provides a drag-and-drop dropzone with automatic file handling.

Drag and drop files here

or browse to upload

Max size: 10 MB

Upload supporting documents

Files: 0

Image Upload with Constraints

Use Multiple, Accept, MaxFileSize, and MaxFileCount to constrain the upload. Set ShowPreview to true to display image thumbnails.

Drag and drop files here

or browse to upload

Accepted: image/*

Max size: 5 MB | Max files: 5

Up to 5 images, max 5 MB each

With Validation Error Handling

Use OnValidationError to handle file validation failures (e.g. wrong type, too large). The ErrorText parameter displays the error message below the control.

Drag and drop files here

or browse to upload

Accepted: .pdf,.docx

Max size: 10 MB | Max files: 10

Custom Dropzone Content

Use the DropzoneContent render fragment to customize the dropzone area with your own content and styling.

Drop files here

or click to browse

Disabled

Set Disabled to true to prevent user interaction. The dropzone and label display with reduced opacity.

Drag and drop files here

or browse to upload

Max size: 10 MB

File uploads are currently disabled.