Styles and Appearance in Blazor File Manager Component

13 Jun 20256 minutes to read

The following content provides the exact CSS structure that can be used to modify the control’s appearance based on the user preference.

Customizing the File Manager navigation pane

To customize the File Manager navigation pane, use the .e-navigation selector and apply styles.

/* Set background color for the File Manager navigation pane */
.e-filemanager .e-navigation {
    background: #3a0647;
}

/* Highlight the active item in the TreeView inside the navigation pane */
.e-filemanager .e-treeview .e-list-item.e-active > .e-fullrow {
    background: #c3d3f9a1;
}

/* Set text color for TreeView items in the navigation pane */
.e-filemanager .e-treeview .e-list-text {
    color: #fff;
}

/* Set icon color for collapsible and expandable TreeView nodes */
.e-treeview .e-icon-collapsible,
.e-treeview .e-icon-expandable {
    color: #fff;
}

Blazor File Manager displays Customized Navigation Pane

Customizing the File Manager thumbnail

To customize the thumbnails in the File Manager, you can apply background-image styles to specific CSS selectors that represent different file types, as listed in the table below.

File Type CSS Selector
Image .e-fe-image
Music .e-fe-music
Excel .e-fe-xlsx
Video .e-fe-video
PowerPoint .e-fe-pptx
RAR .e-fe-rar
ZIP .e-fe-zip
Text .e-fe-txt
JavaScript .e-fe-js
CSS .e-fe-css
HTML .e-fe-html
Unknown .e-fe-unknown
Executable .e-fe-exe
MSI .e-fe-msi
PHP .e-fe-php
Word .e-fe-doc
Word(docx) .e-fe-docx
XML .e-fe-xml
Folder .e-fe-folder

The following example demonstrates how to customize the File Manager’s thumbnail icon for folders:

/* Applies to both Large Icons view and Details view in the File Manager */

.e-filemanager .e-large-icons .e-fe-folder, .e-filemanager .e-grid .e-fe-folder {
    background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSI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XoiLz48L2c+PC9zdmc+");
}

Blazor FileManager displays Custom Thumbnail

Customizing the File Manager layout

To customize the File Manager layout, use the .e-layout-content selector and apply styles.

/* Style for breadcrumb (address bar) */
.e-filemanager .e-layout-content .e-address {
    background: #dee2e6;
}

/* Customize the background for the Large Icons view */
.e-filemanager .e-layout-content .e-large-icons {
    background: #f8f9fa;
}

/* Customize the background for the Details view table and content area */
.e-filemanager .e-layout-content .e-grid .e-table,
.e-filemanager .e-grid .e-gridcontent .e-content {
    background: #f8f9fa;
}

Blazor FileManager displays Custom Layout

Customizing the File Manager Toolbar

To customize the File Manager toolbar items, use the .e-toolbar selector and apply styles.

/* Style for individual toolbar buttons */
.e-filemanager .e-toolbar .e-tbar-btn {
        background: #0d9cf6;
    border: 1px solid #000000;
}

/* Style for toolbar icons */
.e-filemanager .e-toolbar .e-tbar-btn .e-icons {
    color: #ffffff;
}

/* Style for toolbar button text */
.e-filemanager .e-toolbar .e-toolbar-item .e-tbar-btn .e-tbar-btn-text {
    color: #ffffff;
}

Blazor FileManager displays Custom Toolbar

Customizing the File Manager selected files/folders

To customize the File Manager selected files/folders, use the below selectors and apply styles.

/* Highlight for active and hover item in Large Icons view */
.e-filemanager li.e-list-item.e-large-icon.e-active,
.e-filemanager li.e-list-item.e-large-icon.e-active:hover {
    background: #dee2e6;
    border: 2px solid #000000;
    border-radius: 10%;
}

/* Color for text */
.e-filemanager .e-large-icons .e-active {
    color: #212529;
}

/* Highlight for active row in Details view */
.e-filemanager .e-grid td.e-active {
    background: #dee2e6;
}

Blazor FileManager displays Custom Selected Items

Customizing the File Manager Dialog

To customize the dialog popup in the File Manager, you can apply styles to specific CSS selectors, as listed in the table below.

Element CSS Selector
Header .e-dlg-header-content
Content .e-dlg-content
Overlay .e-dlg-overlay
Footer .e-footer-content

In this example, we have applied styles to the header content.

/* For File Manager Dialog header */
.e-filemanager .e-dialog .e-dlg-header-content {
    background-color: #0d6efd;
}
/* For File Manager Dialog header close icon and text*/
.e-filemanager .e-dialog .e-icon-dlg-close,
.e-filemanager .e-dialog .e-dlg-header {
    color: #fff;
}

Blazor FileManager displays Custom Dialog