# file-manager-custom-toolbar-items

> File manager toolbar with a modified New Folder item and a custom Select All checkbox item.

**Framework:** react  **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/react/js/file-manager-custom-toolbar-items.json
```

**Install Package(s)**

```bash
npm install @syncfusion/ej2-react-filemanager @syncfusion/ej2-react-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/FileManager.jsx

```jsx
import { DetailsView, FileManagerComponent, NavigationPane, Toolbar, Inject, ToolbarItemsDirective, ToolbarItemDirective } from '@syncfusion/ej2-react-filemanager';
import { CheckBoxComponent } from '@syncfusion/ej2-react-buttons';
/**
 * File Manager custom toolbar items sample
 */
const CustomToolbarItems = () => {
    let fileObj;
    let checkbox;
    let hostUrl = "https://physical-service.syncfusion.com/";
    let height = "375px";
    let view = "Details";
    let ajaxSettings = {
        downloadUrl: hostUrl + 'api/FileManager/Download',
        getImageUrl: hostUrl + "api/FileManager/GetImage",
        uploadUrl: hostUrl + 'api/FileManager/Upload',
        url: hostUrl + "api/FileManager/FileOperations"
    };
    function checkboxTemplate() {
        return (<CheckBoxComponent ref={(scope) => { checkbox = scope; }} label="Select All" checked={false} change={onChange}/>);
    }
    function onChange(args) {
        if (args.checked) {
            fileObj.selectAll();
            checkbox.label = 'Unselect All';
        }
        else {
            fileObj.clearSelection();
            checkbox.label = 'Select All';
        }
    }
    return (<div>
      <div className="control-section">
          <FileManagerComponent ref={(s) => { fileObj = s; }} id="file" view={view} height={height} ajaxSettings={ajaxSettings}>
                <ToolbarItemsDirective>
                    <ToolbarItemDirective name='NewFolder' text='Create folder' prefixIcon='e-plus' tooltipText='Create folder'/>
                    <ToolbarItemDirective name='Upload'/>
                    <ToolbarItemDirective name='SortBy'/>
                    <ToolbarItemDirective name='Refresh'/>
                    <ToolbarItemDirective name='Cut'/>
                    <ToolbarItemDirective name='Copy'/>
                    <ToolbarItemDirective name='Paste'/>
                    <ToolbarItemDirective name='Delete'/>
                    <ToolbarItemDirective name='Download'/>
                    <ToolbarItemDirective name='Rename'/>
                    <ToolbarItemDirective name='Select' template={checkboxTemplate}/>
                    <ToolbarItemDirective name='Selection'/>
                    <ToolbarItemDirective name='View'/>
                    <ToolbarItemDirective name='Details'/>
                </ToolbarItemsDirective>
                <Inject services={[NavigationPane, DetailsView, Toolbar]}/>
          </FileManagerComponent>
      </div>
  </div>);
};
export default CustomToolbarItems;

```
