DirectoryView

Grid View
Folder is empty

Usage

API

Props

PropTypeDefaultDescription
itemsArray[]Array of file/folder items
viewModeString"list"Display mode: "list" or "grid"
busyBooleanfalseShow loading state
editableBooleantrueAllow rename/edit operations
showSizeBooleanfalseShow size column
showOwnerBooleanfalseShow owner column
showModifiedBooleanfalseShow modified date column
showStarBooleanfalseShow star/favorite column
showShareBooleanfalseShow share option
showExtractBooleantrueShow extract for archives
showNewFileBooleantrueShow "New File" menu option
showNewFolderBooleantrueShow "New Folder" menu option
showCutBooleantrueShow cut option
showCopyBooleantrueShow copy option
showPasteBooleantrueShow paste option
showRenameBooleantrueShow rename option
showSelectAllBooleantrueShow select all option
showDownloadBooleantrueShow download option
showDeleteBooleantrueShow delete option
showUploadFileBooleanfalseShow upload file menu option
showUploadFolderBooleanfalseShow upload folder menu option
multiDownloadBooleanfalseAllow multi-file download
shareIndicatorPropertyString""Item property name for share indicator
fallbackIconString-Fallback icon URL
ownersModelArray[]Owner options for chown dialog
trFunction-Translation function

Handler Props

PropSignatureDescription
deleteHandler(items) => PromiseHandle deletion
changeOwnerHandler(items, newOwnerUid) => PromiseHandle owner change
pasteHandler(action, files, targetItem) => voidHandle paste
newFileHandler() => voidHandle new file creation
newFolderHandler() => voidHandle new folder creation
uploadFileHandler() => voidHandle file upload
uploadFolderHandler() => voidHandle folder upload
shareHandler(item) => voidHandle share
starHandler(item) => voidHandle star/favorite
dropHandler(target, dataTransfer, selected) => voidHandle drag-drop
downloadHandler(item|items) => voidHandle download
extractHandler(item) => voidHandle archive extraction
refreshHandler(item) => voidHandle refresh

Item Properties

PropertyTypeRequiredDescription
idStringYesUnique identifier
nameStringYesDisplay name
iconStringYesIcon URL
previewUrlStringYesThumbnail URL (can be empty)
isDirectoryBooleanNoIs folder
sizeNumberNoFile size in bytes
ownerStringNoOwner name
modifiedDateNoLast modified date
hrefStringNoLink URL
targetStringNoSymlink target

Events

EventPayloadDescription
item-activatedItem objectItem double-clicked/activated
selectionChangedArray of itemsSelection changed
rename-requestedItem objectRename requested via context menu

Methods

MethodArgumentsDescription
highlight(item)Highlight and scroll to item
highlightByName(name)Highlight item by name
getSelected-Get selected items array

Slots

SlotDescription
emptyEmpty state content