# file-manager-custom-toolbar-items

> File manager toolbar with a modified New Folder item and a custom Select All checkbox item.

**Framework:** javascript  **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/javascript/file-manager-custom-toolbar-items.json
```

**Install Package(s)**

```bash
npm install @syncfusion/ej2-filemanager @syncfusion/ej2-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.html

```html
<div class="control-section">
    <div class="sample-container">
        <!-- Initialize FileManager -->
        <div id="container"></div>
    </div>
</div>

```

### src/components/file-manager-custom-toolbar-items/file-manager.ts

```typescript
import { FileManager, Toolbar, NavigationPane, DetailsView } from '@syncfusion/ej2-filemanager';
import { CheckBox, type ChangeEventArgs } from '@syncfusion/ej2-buttons';

FileManager.Inject(Toolbar, NavigationPane, DetailsView);

/**
 * File Manager custom toolbar items sample
 */
export function initFileManagerCustomToolbarItems(): void {
    let checkbox: CheckBox;
    let hostUrl: string = 'https://physical-service.syncfusion.com/';
    let fileManagerInstance: FileManager = new FileManager({
        ajaxSettings: {
            url: hostUrl + 'api/FileManager/FileOperations',
            getImageUrl: hostUrl + 'api/FileManager/GetImage',
            uploadUrl: hostUrl + 'api/FileManager/Upload',
            downloadUrl: hostUrl + 'api/FileManager/Download'
        },
        toolbarItems: [
            { name: 'NewFolder', text: 'Create folder', prefixIcon: 'e-plus', tooltipText: 'Create folder' },
            { name: 'Upload' },
            { name: 'SortBy' },
            { name: 'Refresh' },
            { name: 'Cut' },
            { name: 'Copy' },
            { name: 'Paste' },
            { name: 'Delete' },
            { name: 'Download' },
            { name: 'Rename' },
            { name: 'Select', template: '<input id="checkbox" type="checkbox"/>' },
            { name: 'Selection' },
            { name: 'View' },
            { name: 'Details' }
        ],
        height: '375px',
        created: onCreated
    });
    fileManagerInstance.appendTo('#container');

    // Render the CheckBox inside the custom toolbar item template
    function onCreated(): void {
        checkbox = new CheckBox({ label: 'Select All', checked: false, change: onChange }, '#checkbox');
    }

    function onChange(args: ChangeEventArgs): void {
        if (args.checked) {
            fileManagerInstance.selectAll();
            checkbox.label = 'Unselect All';
        }
        else {
            fileManagerInstance.clearSelection();
            checkbox.label = 'Select All';
        }
    }
}

```
