{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "file-manager-api",
  "framework": "react",
  "type": "registry:component",
  "component": "FileManager",
  "variant": "api",
  "dependencies": [
    "@syncfusion/ej2-react-filemanager",
    "@syncfusion/ej2-react-buttons",
    "@syncfusion/ej2-react-dropdowns"
  ],
  "description": "File manager without navigation pane, with toggles for toolbar, file extensions and thumbnails.",
  "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-api.md"
  },
  "files": [
    {
      "target": "src/components/file-manager-api/FileManager.tsx",
      "content": "import { useState, useRef } from 'react';\nimport { CheckBoxComponent, type ChangeEventArgs } from '@syncfusion/ej2-react-buttons';\nimport { DropDownListComponent } from '@syncfusion/ej2-react-dropdowns';\nimport { FileManagerComponent, Inject, NavigationPane, DetailsView, Toolbar } from '@syncfusion/ej2-react-filemanager';\n\nconst defaultcss = `\n    #all-property-table .property-panel-section .property-panel-content table#property tr {\n        height: 50px;\n    }\n    @media (max-width: 550px) {\n        #rangeSelectionRow {\n            display: none;\n        }\n    }`\n\n/**\n * File Manager API sample\n */\nconst Api = () => {\n\n    const [isVisible, setIsVisible] = useState<boolean>(true);\n    const [isShowFileExtension, setIsShowFileExtension] = useState<boolean>(true);\n    const [isShowThumbnail, setShowThumbnail] = useState<boolean>(true);\n    const [isEnableRangeSelection, setEnableRangeSelection] = useState<boolean>(true);\n    let hostUrl: string = \"https://physical-service.syncfusion.com/\";\n    let fmObj = useRef<FileManagerComponent>(null);\n    let disableDropDownList = useRef<DropDownListComponent>(null);\n    let enableDropDownList = useRef<DropDownListComponent>(null);\n    let items = ['NewFolder', 'Cut', 'Copy', 'Paste', 'Download', 'Delete', 'Refresh', 'Selection', 'View', 'Details'];\n\n    const toolCheck = (args: ChangeEventArgs, id: string): void => {\n            if (id == \"toolbar\") {\n                setIsVisible(args.checked as boolean);\n            }\n            if (id == \"fileExtension\") {\n                setIsShowFileExtension(args.checked as boolean);\n            }\n            if (id == \"thumbnail\") {\n                setShowThumbnail(args.checked as boolean);\n            }\n            if (id == \"rangeSelection\") {\n                setEnableRangeSelection(args.checked as boolean);\n            }\n    }\n\n    const onDisableItemChange = (args: any) => {\n        if (args.itemData != null){\n            fmObj.current!.disableToolbarItems([args.itemData.value]);\n            if(args.value === enableDropDownList.current!.value){\n                enableDropDownList.current!.value = null;\n            }\n        }\n    }\n\n    const onEnableItemChange = (args: any) => {\n        if (args.itemData != null){\n            fmObj.current!.enableToolbarItems([args.itemData.value]);\n            if(args.value === disableDropDownList.current!.value){\n                disableDropDownList.current!.value = null;\n            }\n        }\n    }\n\n    return(\n        <div>\n            <style>{defaultcss}</style>\n            <div className=\"col-lg-8 control-section\">\n                <FileManagerComponent id=\"api_filemanager\" ref={fmObj} ajaxSettings = {{ url: hostUrl + \"api/FileManager/FileOperations\", getImageUrl: hostUrl + \"api/FileManager/GetImage\", uploadUrl: hostUrl + 'api/FileManager/Upload', downloadUrl: hostUrl + 'api/FileManager/Download' }} toolbarSettings={{items: ['NewFolder', 'SortBy', 'Cut', 'Copy', 'Paste', 'Delete', 'Refresh', 'Download', 'Rename', 'Selection', 'View', 'Details'], visible: isVisible}} contextMenuSettings={{file: [ 'Cut', 'Copy', '|', 'Delete', 'Download', 'Rename', '|', 'Details'], layout: ['SortBy', 'View', 'Refresh', '|', 'Paste', '|', 'NewFolder', '|', 'Details', '|', 'SelectAll'], visible: true }} view={\"LargeIcons\"} navigationPaneSettings={{visible: false}} allowMultiSelection={true} showFileExtension={isShowFileExtension} showThumbnail={isShowThumbnail} enableRangeSelection={isEnableRangeSelection}>\n                    <Inject services={[ NavigationPane, DetailsView, Toolbar]} />\n                </FileManagerComponent>\n            </div>\n            <div id=\"all-property-table\" className='col-lg-4 property-section'>\n                <div className=\"property-panel-section\">\n                    <div className=\"property-panel-header\">Properties</div>\n                    <div className=\"property-panel-content\">\n                        <table id=\"property\" title=\"Properties\" className='property-panel-table' style={{ width: \"100%\" }}>\n                            <tbody>\n                                <tr>\n                                    <td style={{ width: '50%' }}>\n                                        <div style={{ fontSize : '14px', paddingLeft: '0px' }}>Enable Range Selection</div>\n                                    </td>\n                                    <td style={{ width: '50%', paddingRight: '10px' }}>\n                                        <div>\n                                            <CheckBoxComponent id=\"rangeSelection\" checked={true} change={(args) => toolCheck(args, \"rangeSelection\")}></CheckBoxComponent>\n                                        </div>\n                                    </td>\n                                </tr>\n                                <tr>\n                                    <td style={{ width: '50%' }}>\n                                        <div style={{ fontSize : '14px', paddingLeft: '0px' }}>Toolbar</div>\n                                    </td>\n                                    <td style={{ width: '50%', paddingRight: '10px' }}>\n                                        <div>\n                                            <CheckBoxComponent id=\"toolbar\" checked={true} change={(args) => toolCheck(args, \"toolbar\")}></CheckBoxComponent>\n                                        </div>\n                                    </td>\n                                </tr>\n                                <tr>\n                                    <td style={{ width: '50%' }}>\n                                        <div style={{ fontSize : '14px', paddingLeft: '0px' }}>Show File Extension</div>\n                                    </td>\n                                    <td style={{ width: '50%', paddingRight: '10px' }}>\n                                        <div>\n                                            <CheckBoxComponent id=\"fileExtension\" checked={true} change={(args) => toolCheck(args, \"fileExtension\")}></CheckBoxComponent>\n                                        </div>\n                                    </td>\n                                </tr>\n                                <tr>\n                                    <td style={{ width: '50%' }}>\n                                        <div style={{ fontSize : '14px', paddingLeft: '0px' }}>Show Thumbnail</div>\n                                    </td>\n                                    <td style={{ width: '50%', paddingRight: '10px' }}>\n                                        <div>\n                                            <CheckBoxComponent id=\"thumbnail\" checked={true} change={(args) => toolCheck(args, \"thumbnail\")}></CheckBoxComponent>\n                                        </div>\n                                    </td>\n                                </tr>\n                                <tr>\n                                    <td style={{ width: '50%' }}>\n                                        <div style={{ fontSize : '14px', paddingLeft: '0px' }}>Disable Toolbar Item</div>\n                                    </td>\n                                    <td style={{ width: '50%', paddingLeft: '10px' }}>\n                                        <div>\n                                            <DropDownListComponent ref={disableDropDownList} id=\"disable\" dataSource={items} change={onDisableItemChange.bind(this)}></DropDownListComponent>\n                                        </div>\n                                    </td>\n                                </tr>\n                                <tr>\n                                    <td style={{ width: '50%' }}>\n                                        <div style={{ fontSize : '14px', paddingLeft: '0px' }}>Enable Toolbar Item</div>\n                                    </td>\n                                    <td style={{ width: '50%', paddingLeft: '10px' }}>\n                                        <div>\n                                            <DropDownListComponent ref={enableDropDownList} id=\"enable\" dataSource={items} change={onEnableItemChange.bind(this)}></DropDownListComponent>\n                                        </div>\n                                    </td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </div>\n                </div>\n            </div>\n        </div>\n    );\n}\nexport default Api;\n"
    }
  ]
}