File Manager

File manager with a folder tree, breadcrumbs, virtual icon grid and list view.

File Manager

Explorer

Double-click folders to open them. Click to select, Ctrl / ⌘ + click to toggle, and Shift + click to select a range. Drop onto folders, the tree or breadcrumbs to move entries; Shift + wheel resizes icons. Open 10,000 files from the toolbar and switch between icons and list view. The data-driven context menu includes a custom Information action.

Search and toolbar

The toolbar contains name search and one view toggle. Search matches file and folder names in the current directory. Right-click blank content space and open the Sort submenu to choose a criterion or direction. Configure criteria with sortOptions and optional compare(a, b). Bind v-model:sort to { key, order }, with ascending or descending order. Name ascending is the default; behavior.foldersFirst controls folder grouping.

The toolbar slot replaces the whole row. It exposes search / setSearch, view / setView / toggleView, plus directory, selection, pending, showHidden / setShowHidden, sort / setSort and sortOptions.

Data and operations

v-model is a flat FileManagerEntry[]. Each record needs a unique id, parentId, name and kind (folder / file). Root entries use parentId: null. Parent links must be acyclic and point to folders. IDs remain stable across renames and moves. size is in bytes, modifiedAt accepts a date string or timestamp, and data holds application metadata.

All entry points share validation. A destination cannot be the source or its descendant; sibling names must be unique, case-insensitively. permissions can deny rename, delete, move, copy and create independently; disabled disables the entry. Subtree operations also check descendant permissions.

Use beforeOperation(operation, context, nextEntries) for persistence, authorization or deletion confirmation. The third argument contains the proposed array, including IDs allocated for new records. Return false to cancel; throw or reject to emit operation-error. Only successful operations emit the next array and operation. Concurrent mutations are blocked; data replacement or navigation invalidates pending requests. The component does not manage disks, upload files, implement a recycle bin or open/download files itself. Add Upload through toolbar, handle open, and reload application data on refresh.

Copy/cut buffers belong to one manager instance; cross-instance/application and OS-file drops are not internal moves. Name conflicts are rejected without overwriting; applications can expose custom menu actions for their own conflict workflows.

File previews

folder-preview customizes directory covers; the example finds four child thumbnails by parentId. Files use previewRenderers, selecting the first matching rule in array order. A rule can specify extensions (case-insensitive, optional leading dot), mimeTypes (including image/*), match(entry) and render(context). Return Vue nodes with h() instead of adding a slot for every extension. Context contains entry, view, selected and size. Unmatched files use configured thumbnails or a generic file icon. Renderers own media loading and complex preview behavior; never interpret untrusted text as HTML.

Root navigation uses Home. Customize icons.home; rootLabel supplies its accessible name and tooltip. icons.folder / folderOpen distinguish folder states. Enable treeShowFiles to include files in the tree. thumbnails matches extensions case-insensitively, ignoring a leading dot. Strings are SVG/PNG image URLs; { icon: "lo-home" } uses a registered icon and { src: "/file.svg" } uses an image. Precedence is entry thumbnail, extension mapping, *, then the generic file icon. With no matching thumbnail or custom file icon, extensions of one or two characters appear inside the fallback SVG; longer or absent extensions use the plain file glyph. Both panes share these rules. Call renderDefault() in the folder slot to reuse its glyph.

Files and folders accept hidden: true. Omitted values fall back to dot-prefixed names; explicit hidden: false overrides this. The upper-left eye toggles both panes. Hide/unhide actions issue set-hidden operations, respecting permissions.hide and beforeOperation. Custom menus can compose context.defaultItems to keep built-in actions.

Behavior and global configuration

Set global behavior, view, tileSize, treeShowFiles, icons, thumbnails and sortOptions through SConfigProvider.fileManager or the fileManager installation option. Local props win; behavior merges per field. Toggle drag/drop, wheel zoom and the Delete shortcut below. Entry permissions remain independent.

Keyboard and virtualization

OptionDefaultBehavior
multipletrueAllow multiple selection
rangeSelecttrueShift + click/arrows selects a range
toggleSelecttrueCtrl / ⌘ + click toggles selection
keyboardtrueEnable scoped keyboard shortcuts
deleteKeytrueDelete removes entries; guard it for confirmation
renameKeytrueF2 renames, Enter saves, Escape cancels
clipboardtrueCtrl / ⌘ + X/C/V cuts, copies and pastes
dragDroptrueFolder tiles, tree and breadcrumbs are drop targets
wheelZoomtrueShift + wheel changes tiles; Ctrl + wheel keeps browser zoom
openOndouble-clickSet click for single-click opening
foldersFirsttrueSort folders before files
typeaheadtrueType a name prefix to focus a matching file
showHiddenfalseShow dot-prefixed files and folders

Space toggles the focused entry and typing a name prefix locates a match. Arrow keys move focus and selection; Ctrl / ⌘ + arrows moves focus only. Home / End and PageUp / PageDown navigate, Enter opens, Ctrl / ⌘ + A selects all, Ctrl / ⌘ + Shift + N creates a folder, F5 requests refresh, Alt + Up opens the parent, and Alt + Left / Right browses history. ContextMenu or Shift + F10 opens the menu. Inputs retain their editing shortcuts.

The icon grid derives columns from container width and tileSize, then virtualizes rows with SVirtualList. Resizing or zooming restores the top entry by stable ID. Selection is independent of mounted DOM, including off-screen range selection. The tree virtualizes expanded rows. Previews use a fixed tile frame; constrain custom content to that frame. Indexing, filtering and sorting still happen in memory; applications should load and replace data for very large remote sources.

The example starts with 10,000 files and can load 100,000. Jump to the start, middle or end, or scroll manually. Use the view button to switch grid/list and Shift + wheel to resize tiles. Enable the file tree to test its virtual scrolling too.

Shape

Rounded and square geometry share the same interactions and propagate to internal controls and floating panels.

API

PROPS

Property
Type
Description
default
Example
More
v-model
[]
Files and directories; root entries have parentId null.
[]
v-model:directory-id
| null
Open directory ID; null means root.
—
v-model:selected-ids
[]
Selected stable IDs.
[]
v-model:view
Icon grid or list view.
grid
v-model:tile-size
Number
Tile width clamped to 88–280 px; adjustable with Shift + wheel.
144
v-model:show-hidden
Boolean
Show hidden entries; toggle with the upper-left eye.
false
v-model:sort
Current sort criterion and direction.
—
sort-options
[]
Sort criteria with optional custom comparators.
—
tree-show-files
Boolean
Include files in the tree.
false
icons
Customize Home, folder states, files and toolbar icons.
—
thumbnails
Map extensions to image URLs or icon configurations.
—
height
String | Number
Overall manager height.
560
tree-width
Number
Tree width with a 140 px minimum.
216
show-tree
Boolean
Show the folder tree.
true
root-label
String
Accessible name and tooltip for Home; localized when omitted.
—
behavior
Override matching global fileManager.behavior options.
—
preview-renderers
[]
First matching extension, MIME or predicate renderer wins.
[]
context-menu
false | [] | ((context: ) => [])
Disable or replace the default menu; custom items emit menu-select.
—
before-operation
(operation: , context: , nextEntries: readonly []) => boolean | void | Promise<boolean | void>
Async mutation guard; false cancels, throwing emits operation-error.
—
create-id
() =>
Unique ID factory for creation/copy; defaults to crypto.randomUUID.
—
shape
Geometry inherited from ConfigProvider or installation options.
rounded

EVENTS

Event
Type
Description
default
Example
More
selection-change
(entries: []) => void
Selection changed.
—
navigate
(id: | null) => void
Directory navigation.
—
open
(entry: ) => void
Open a file; the application handles preview/download.
—
operation
(operation: , entries: []) => void
Successful mutation and the complete next array.
—
operation-error
(error: unknown, operation: ) => void
Validation or async persistence failure.
—
menu-select
(item: , context: ) => void
Menu selection; action invokes a built-in command.
—
refresh
(id: | null) => void
Request that the application reload the directory.
—

SLOTS

Slot
Description
default
Example
More
folder-preview
Folder cover, such as a four-image collage.
—
toolbar
Replace the whole row using search and view state and update hooks.
—
status
Footer item/selection counts.
—

EXPOSES

Method
Type
Description
default
Example
More
navigate
(id: | null) => void
Open a directory.
—
execute
(operation: ) => Promise<boolean>
Execute through shared validation and async guards.
—
select
(ids: []) => void
Change selection.
—
rename
(entry: ) => void
Start inline renaming.
—
scroll-to
(id: ) => Promise<void>
Reveal an entry in the current directory.
—
Last Updated: 2026-10-28, 06:17:56 UTC
Copied