{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "file-manager-custom-toolbar-items",
  "framework": "react",
  "type": "registry:component",
  "component": "FileManager",
  "variant": "custom-toolbar-items",
  "dependencies": [
    "@syncfusion/ej2-react-filemanager",
    "@syncfusion/ej2-react-buttons"
  ],
  "description": "File manager toolbar with a modified New Folder item and a custom Select All checkbox item.",
  "meta": {
    "essentialStudioRelease": "2026 Volume 3 (v35.1.37)",
    "license": "commercial-or-community",
    "licenseNote": "The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md",
    "requiresLicenseKey": true,
    "requiresServerEndpoint": true,
    "platformIndex": "https://ai.syncfusion.com/react/llms.txt",
    "skillPack": "syncfusion/react-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/react/ts/file-manager-custom-toolbar-items.md"
  },
  "files": [
    {
      "target": "src/components/file-manager-custom-toolbar-items/FileManager.tsx",
      "content": "import { DetailsView, FileManagerComponent, NavigationPane, Toolbar, Inject, ToolbarItemsDirective, ToolbarItemDirective, type ViewType } from '@syncfusion/ej2-react-filemanager';\nimport { CheckBoxComponent, type ChangeEventArgs } from '@syncfusion/ej2-react-buttons';\n\n/**\n * File Manager custom toolbar items sample\n */\nconst CustomToolbarItems = () => {\n  let fileObj: FileManagerComponent;\n  let checkbox: CheckBoxComponent;\n  let hostUrl: string = \"https://physical-service.syncfusion.com/\";\n  let height: string = \"375px\";\n  let view: ViewType = \"Details\";\n  let ajaxSettings: object = {\n      downloadUrl: hostUrl + 'api/FileManager/Download',\n      getImageUrl: hostUrl + \"api/FileManager/GetImage\",\n      uploadUrl: hostUrl + 'api/FileManager/Upload',\n      url: hostUrl + \"api/FileManager/FileOperations\"\n  };\n\n  function checkboxTemplate() {\n    return (\n      <CheckBoxComponent ref={ (scope: CheckBoxComponent | null) => { checkbox = scope as CheckBoxComponent; }} label=\"Select All\" checked={false} change={onChange} />\n    );\n  }\n\n  function onChange(args: ChangeEventArgs) {\n    if (args.checked) {\n      fileObj.selectAll();\n      checkbox.label = 'Unselect All';\n    }\n    else {\n      fileObj.clearSelection();\n      checkbox.label = 'Select All';\n    }\n  }\n  return (\n  <div>\n      <div className=\"control-section\">\n          <FileManagerComponent ref={ (s: FileManagerComponent | null) => { fileObj = s as FileManagerComponent; }} id=\"file\" view={view} height={height}\n              ajaxSettings = {ajaxSettings}>\n                <ToolbarItemsDirective>\n                    <ToolbarItemDirective name= 'NewFolder' text= 'Create folder' prefixIcon= 'e-plus' tooltipText= 'Create folder'/>\n                    <ToolbarItemDirective name= 'Upload'/>\n                    <ToolbarItemDirective name= 'SortBy'/>\n                    <ToolbarItemDirective name= 'Refresh'/>\n                    <ToolbarItemDirective name= 'Cut'/>\n                    <ToolbarItemDirective name= 'Copy'/>\n                    <ToolbarItemDirective name= 'Paste'/>\n                    <ToolbarItemDirective name= 'Delete'/>\n                    <ToolbarItemDirective name= 'Download'/>\n                    <ToolbarItemDirective name= 'Rename'/>\n                    <ToolbarItemDirective name= 'Select' template={checkboxTemplate}/>\n                    <ToolbarItemDirective name= 'Selection'/>\n                    <ToolbarItemDirective name= 'View'/>\n                    <ToolbarItemDirective name= 'Details'/>\n                </ToolbarItemsDirective>\n                <Inject services={[ NavigationPane, DetailsView, Toolbar]} />\n          </FileManagerComponent>\n      </div>\n  </div>\n  );\n}\nexport default CustomToolbarItems;\n"
    }
  ]
}