{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "file-manager-custom-context-menu-item",
  "framework": "vue",
  "type": "registry:component",
  "component": "FileManager",
  "variant": "custom-context-menu-item",
  "dependencies": [
    "@syncfusion/ej2-vue-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/vue/llms.txt",
    "skillPack": "syncfusion/vue-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/vue/file-manager-custom-context-menu-item.md"
  },
  "files": [
    {
      "target": "src/components/file-manager-custom-context-menu-item/FileManager.vue",
      "content": "<template>\n  <div class=\"control-section file-custom-menu\">\n    <div class=\"sample-container\">\n      <ejs-filemanager\n        id=\"file-manager\"\n        ref=\"file_instance\"\n        :contextMenuSettings=\"contextMenuSettings\"\n        :ajaxSettings=\"ajaxSettings\"\n        :menuOpen=\"menuOpen\"\n        :menuClick=\"menuClick\"\n      />\n    </div>\n  </div>\n</template>\n\n<script lang=\"ts\">\nimport { FileManagerComponent, DetailsView, NavigationPane, Toolbar } from '@syncfusion/ej2-vue-filemanager';\n\nexport default {\n  components: {\n    'ejs-filemanager': FileManagerComponent\n  },\n  data() {\n    return {\n      ajaxSettings: {\n        url: 'https://physical-service.syncfusion.com/api/FileManager/FileOperations',\n        getImageUrl: 'https://physical-service.syncfusion.com/api/FileManager/GetImage',\n        uploadUrl: 'https://physical-service.syncfusion.com/api/FileManager/Upload',\n        downloadUrl: 'https://physical-service.syncfusion.com/api/FileManager/Download'\n      },\n      // Custom menu item added to context menu\n      contextMenuSettings: {\n        file: ['Custom', 'Open', '|', 'Delete', 'Rename', '|', 'Details'],\n        folder: ['Custom', 'Open', '|', 'Delete', 'Rename', '|', 'Details'],\n        layout: ['Custom', 'SortBy', 'View', 'Refresh', '|', 'NewFolder', 'Upload', '|', 'Details', '|', 'SelectAll'],\n        visible: true\n      }\n    };\n  },\n  provide() {\n    return {\n      filemanager: [DetailsView, NavigationPane, Toolbar]\n    };\n  },\n  methods: {\n    // Icon added to custom menu item in menuOpen event\n    menuOpen(args: any) {\n      for (let i = 0; i < args.items.length; i++) {\n        if (args.items[i].id === (this.$refs.file_instance as any).$el.id + '_cm_custom') {\n          args.items[i].iconCss = 'e-icons e-fe-tick';\n        }\n      }\n    },\n    // Displaying alert for custom menu in menuClick event\n    menuClick(args: any) {\n      if (args.item.text === 'Custom') {\n        alert('You have clicked custom menu item');\n      }\n    }\n  }\n};\n</script>\n\n<style scoped>\n.file-custom-menu .sample-container {\n  margin: 10px 10px 10px 10px;\n}\n</style>\n"
    }
  ]
}