# file-manager-custom-toolbar-items

> File manager toolbar with a modified New Folder item and a custom Select All checkbox item.

**Framework:** angular  **Component:** FileManager  **Variant:** custom-toolbar-items

## Get this item

**If you are an agent, fetch the JSON.** Source is inlined, so one request is enough and no tooling is required:

```
GET https://ai.syncfusion.com/r/angular/file-manager-custom-toolbar-items.json
```

**Install Package(s)**

```bash
npm install @syncfusion/ej2-angular-filemanager @syncfusion/ej2-angular-buttons
```

**Notes**

- Syncfusion release: 2026 Volume 3 (v35.1.37)
- The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md

## Source files

### src/components/file-manager-custom-toolbar-items/file-manager.component.html

```html
<div class="sample-container">
    <ejs-filemanager id='files' #fileManager [ajaxSettings]='ajaxSettings' height="375px">
        <e-toolbaritems>
            <e-toolbaritem name="NewFolder" text="Create folder" prefixIcon="e-plus" tooltipText="Create folder"></e-toolbaritem>
            <e-toolbaritem name="Upload"></e-toolbaritem>
            <e-toolbaritem name="SortBy"></e-toolbaritem>
            <e-toolbaritem name="Refresh"></e-toolbaritem>
            <e-toolbaritem name="Cut"></e-toolbaritem>
            <e-toolbaritem name="Copy"></e-toolbaritem>
            <e-toolbaritem name="Paste"></e-toolbaritem>
            <e-toolbaritem name="Delete"></e-toolbaritem>
            <e-toolbaritem name="Download"></e-toolbaritem>
            <e-toolbaritem name="Rename"></e-toolbaritem>
            <e-toolbaritem name="Select">
                <ng-template #template>
                    <ejs-checkbox #checkbox label="Select All" [checked]="false" (change)="onChange($event)"></ejs-checkbox>
                </ng-template>
            </e-toolbaritem>
            <e-toolbaritem name="Selection"></e-toolbaritem>
            <e-toolbaritem name="View"></e-toolbaritem>
            <e-toolbaritem name="Details"></e-toolbaritem>
        </e-toolbaritems>
    </ejs-filemanager>
</div>

```

### src/components/file-manager-custom-toolbar-items/file-manager.component.ts

```typescript
import { Component, ViewChild, ViewEncapsulation } from '@angular/core';
import { FileManagerComponent, FileManagerAllModule, NavigationPaneService, ToolbarService, DetailsViewService } from '@syncfusion/ej2-angular-filemanager';
import { CheckBoxComponent, CheckBoxModule, ChangeEventArgs } from '@syncfusion/ej2-angular-buttons';
/**
 * File Manager custom toolbar items sample
 */
@Component({
    selector: 'control-content',
    templateUrl: 'file-manager.component.html',
    styleUrls: ['../file-manager-common.style.css'],
    encapsulation: ViewEncapsulation.None,
    providers: [NavigationPaneService, ToolbarService, DetailsViewService],
    standalone: true,
    imports: [FileManagerAllModule, CheckBoxModule]
})

export class CustomToolbarItemsController {
    @ViewChild('fileManager')
    public fileManagerInstance?: FileManagerComponent;
    @ViewChild('checkbox')
    public checkbox?: CheckBoxComponent;
    public ajaxSettings?: object;
    public hostUrl: string = 'https://physical-service.syncfusion.com/';
    public ngOnInit(): void {
        this.ajaxSettings = {
            url: this.hostUrl + 'api/FileManager/FileOperations',
            getImageUrl: this.hostUrl + 'api/FileManager/GetImage',
            uploadUrl: this.hostUrl + 'api/FileManager/Upload',
            downloadUrl: this.hostUrl + 'api/FileManager/Download'
        };
    }
    public onChange(args: ChangeEventArgs): void {
        if (args.checked) {
            (this.fileManagerInstance as FileManagerComponent).selectAll();
            (this.checkbox as CheckBoxComponent).label = 'Unselect All';
        }
        else {
            (this.fileManagerInstance as FileManagerComponent).clearSelection();
            (this.checkbox as CheckBoxComponent).label = 'Select All';
        }
    }
}

```
