{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "file-manager-custom-context-menu-item",
  "framework": "react",
  "type": "registry:component",
  "component": "FileManager",
  "variant": "custom-context-menu-item",
  "dependencies": [
    "@syncfusion/ej2-react-filemanager"
  ],
  "description": "File manager context menu with an added Custom item that runs its own handler when clicked.",
  "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-context-menu-item.md"
  },
  "files": [
    {
      "target": "src/components/file-manager-custom-context-menu-item/FileManager.tsx",
      "content": "import { DetailsView, FileManagerComponent, NavigationPane, Toolbar, Inject, type ViewType } from '@syncfusion/ej2-react-filemanager';\n\n/**\n * File Manager custom context menu item sample\n */\nconst CustomContextMenuItem = () => {\n  let fileObj: FileManagerComponent;\n  let hostUrl: string = \"https://physical-service.syncfusion.com/\";\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  let contextMenuSettings: object = {\n    file: ['Open', '|', 'Delete', 'Rename', '|', 'Details', 'Custom'],\n    folder: ['Open', '|', 'Delete', 'Rename', '|', 'Details', 'Custom'],\n    layout: ['SortBy', 'View', 'Refresh', '|', 'NewFolder', 'Upload', '|', 'Details', '|', 'SelectAll', 'Custom'],\n  };\n  let height: string = \"375px\";\n  let view: ViewType = \"Details\";\n  function menuClick(args: any): void {\n    if (args.item.text === 'Custom') {\n        alert('You have clicked custom menu item')\n    }\n  }\n\n  function menuOpen(args: any): void {\n    for(const i in args.items) {\n        if(args.items[i].id === fileObj.element.id +'_cm_custom') {\n            args.items[i].iconCss= 'e-icons e-fe-tick';\n        }\n    }\n  }\n\n  return (\n  <div>\n      <div className=\"control-section\">\n        <FileManagerComponent ref={ (s: FileManagerComponent | null) => { fileObj = s as FileManagerComponent; }} id=\"file\" height={height} view={view}\n          ajaxSettings={ajaxSettings}\n          contextMenuSettings={contextMenuSettings}\n          menuClick={menuClick} menuOpen={menuOpen} >\n              <Inject services={[ NavigationPane, DetailsView, Toolbar]} />\n          </FileManagerComponent>\n      </div>\n  </div>\n  );\n}\nexport default CustomContextMenuItem;\n"
    }
  ]
}