A standalone MudBlazor-based file explorer component with a compact list UI. Upload, cut/copy/paste, delete, etc.
src/MuddyFileExplorer- reusable Razor class librarysamples/MuddyFileExplorer.Sample- Blazor Web App sample using a sandboxed local file provider
- Dense MudBlazor file list using
MudDataGrid - Columns for icon, file name, size, type, and modified date
- Breadcrumb folder navigation
- Search/filter box
- New-file and new-folder actions
- Upload button and drag-and-drop upload area
- Queued uploads with per-file progress
- Provider-driven download action (files and folders)
- Context actions for open, rename, cut/copy/paste, delete, and download
- Status bar for selected item/folder summary
Register MudBlazor in the host app:
builder.Services.AddMudServices();Include MudBlazor providers in the host layout:
<MudThemeProvider />
<MudPopoverProvider />
<MudDialogProvider />
<MudSnackbarProvider />Use the component with an IFileExplorerProvider implementation:
@using MuddyFileExplorer
@using MuddyFileExplorer.Components
<MuddyFileExplorer Provider="@FileProvider"
Dense="true"
MultiSelection="true"
MaxUploadFileSize="104857600" />Hosts implement IFileExplorerProvider for file operations:
- list folder contents
- create file
- create folder
- rename item
- move item (cut/paste; auto-renames on name conflict)
- copy item (recursive folder copy; auto-renames on name conflict)
- delete item
- download item (file stream or folder zip stream)
- upload file with progress
move and copy never overwrite: when the destination already has an item with
the same name they auto-rename (for example x.txt → x (2).txt). copy
propagates the cancellation token, validates that the destination folder exists,
and rejects copying a folder into itself or one of its descendants.
The component offers AllowCut and AllowCopy parameters (both default true),
and items carry a CanCopy flag (alongside CanMove, which gates cut). The
UI-facing models use opaque item IDs. Providers should not expose physical paths to
the browser.
Breaking change (plan 088):
CopyAsyncis a required interface member, andListMoveTargetsAsyncwas removed. The component parameterAllowMovewas replaced byAllowCut/AllowCopy. External consumers must implementCopyAsync, dropListMoveTargetsAsync, and switch to the new parameters — seeplan089-migrate-external-consumer.
See styling.md for supported CSS hooks and examples for row density, font size, cell padding, and folder link/icon sizing.
Run the sample from this folder:
dotnet run --project samples/MuddyFileExplorer.Sample/MuddyFileExplorer.Sample.csprojThe sample stores demo files under samples/MuddyFileExplorer.Sample/App_Data/FileExplorerSandbox. It normalizes file paths, rejects traversal outside the sandbox, and serves downloads through the provider download API.
