Neura UI

Loading…

 Logo

File Manager

Browse folders, select files, switch between list and grid, and open a details panel from the keyboard.

Files

Pass a tree to :items . Each node takes id , name , size , modified , mime , thumbnail , and children on folders; optionally url (for the preview), duration in seconds, width / height and starred . Each type gets a tinted badge, a Type column, and dates read the way people say them ("5 minutes ago", "yesterday", "Nov 3"), the full date on hover. Each row has a "…" button for its actions.
javascript
selected

Folders

Files

Drop to upload

<neura::file-manager :items="$tree" height="26rem" />

$tree = [
    [
        'id' => 'projects',
        'name' => 'Projects',
        'type' => 'folder',
        'modified' => '2026-07-21 09:12',
        'children' => [
            ['id' => 'brief', 'name' => 'brief.pdf', 'size' => 482310],
        ],
    ],
    ['id' => 'readme', 'name' => 'README.md', 'size' => 4096],
];

Grid

view sets the first layout. The toolbar still switches between list and grid. Folders come first as compact cards; files show their thumbnail (a picture's own url otherwise), a video its still with its duration , other files a tile tinted by their type. A slider in the toolbar (in a wide enough file manager) sets the card size, from thumb-size 1 to 5. Open Media to see the previews.
blade
selected

Folders

Files

Drop to upload

<neura::file-manager :items="$tree" view="grid" />

Side panel

sidebar adds a panel with your :shortcuts and the folder tree; drop files on a folder to move them there.
blade
selected

Folders

Files

Drop to upload

<neura::file-manager
    :items="$tree"
    sidebar
    :shortcuts="[
        ['id' => 'home', 'label' => 'Home', 'icon' => 'home'],
        ['id' => 'recent', 'label' => 'Recent', 'icon' => 'clock'],
        ['id' => 'starred', 'label' => 'Starred', 'icon' => 'star'],
        ['id' => 'trash', 'label' => 'Trash', 'icon' => 'trash'],
    ]"
    x-on:file-manager:shortcut="$wire.showShortcut($event.detail.id)"
/>

Preview

Space, a double-click or Enter on a file opens it over the file manager: pictures (zoom with + / −, Ctrl + wheel, drag when zoomed), videos and sounds in the browser's player, PDFs in its viewer, text and code read from url (the first 512 KB). ← / → go through the folder's files, Escape or Space close. It dispatches file-manager:preview (item , path ); Open dispatches file-manager:open . :preview="false" goes back to dispatching open straight away. Open Projects › Neura UI › cover.png in the first example.

Rename and create in place

F2, Rename in the menu or in the selection bar turns the name into a field with the name selected up to its extension; Enter confirms, Escape cancels. Empty names, slashes and names already in the folder are refused on the spot. The new name shows at once and file-manager:rename carries items , name and path . New folder adds a row being named; Enter dispatches file-manager:new-folder with name and path , and the row stays, dimmed, until your items come back. :inline-create="false" keeps the old behaviour: the button only dispatches new-folder with path .
Blade
<neura::file-manager
    :items="$tree"
    x-on:file-manager:rename="$wire.rename($event.detail.items[0].id, $event.detail.name)"
    x-on:file-manager:new-folder="$wire.createFolder($event.detail.path, $event.detail.name)"
/>

Uploads

Upload opens the browser's file picker (:upload-picker="false" dispatches upload-request instead), and files can be dropped. Either way file-manager:upload carries files , path and uploads — [{ id, name, size, file }] — and a panel lists them. Your app sends the files and reports back with browser events: file-manager:progress { id, progress } , file-manager:uploaded { id } and file-manager:failed { id, message } (each file manager only listens to its own ids). Cancel and Retry dispatch upload-cancel and upload-retry (id , and the file to send again). Here the progress is simulated: drop files or press Upload.
blade
selected

Folders

Files

Drop to upload

<neura::file-manager
    :items="$tree"
    x-on:file-manager:upload="
        for (const upload of $event.detail.uploads) {
            $wire.upload('file', upload.file,
                () => $dispatch('file-manager:uploaded', { id: upload.id }),
                () => $dispatch('file-manager:failed', { id: upload.id }),
                (event) => $dispatch('file-manager:progress', { id: upload.id, progress: event.detail.progress }),
            )
        }"
/>

Selection

A selection floats a bar at the foot of the files: Download, Move (pick a folder from the tree), Rename, Delete. Drag the mouse from an empty spot to select with a lasso (Ctrl / ⌘ adds to the selection; never by touch, so fingers scroll). Ctrl / ⌘ + C or X, then Ctrl / ⌘ + V in another folder, copies or moves: a cut moves at once (file-manager:move ), a copy dispatches file-manager:copy (items , target ) for your app to make. The keys only act in the file manager that has the focus.

Filters

Chips under the toolbar keep one kind of file — Folders, Images, Documents, Videos, Audio, Archives, Code — among those the open folder holds (shown from two kinds on); file-manager:filter carries the kind . Opening another folder goes back to All. :filters="false" hides them. While searching, the field says where it looks: In this folder or Everywhere.

Accent colour

Selection, focus, active chips, progress and the + button use color : the theme's primary by default, any kit colour otherwise, globally in config('neura-kit.file-manager.default.color') or for one file manager. Type badges keep their own hues.
blade
selected

Folders

Files

Drop to upload

<neura::file-manager :items="$tree" color="info" />

Narrow and touch

The layout follows the file manager's own width, not the screen's. Narrow, rows grow to a finger's size, "…" stays on every row, the search folds into an icon, a + button offers New folder and Upload, and the side panel becomes a drawer. By touch, a tap opens; a long press starts selecting, and the selection's actions take the toolbar's place. With starrable , files get a star (file-manager:star , item , starred ) — see the side panel example.

Compact

Turn off the actions you do not need when the browser sits in a side panel or a dialog.
blade

Folders

Files

Drop to upload

<neura::file-manager
    :items="$tree"
    size="sm"
    :selectable="false"
    :details="false"
    :uploadable="false"
    :creatable="false"
    :deletable="false"
/>

Events

Every interaction dispatches a file-manager: event. Listen in Alpine or Livewire.
blade
selected

Folders

Files

Drop to upload

Events

Select, open, or delete an item to see the events.

<div
    x-data="{ log: [] }"
    x-on:file-manager:open="log.unshift($event.detail.items[0].name)"
    x-on:file-manager:navigate="console.log($event.detail.path)"
    x-on:file-manager:select="console.log($event.detail.items)"
>
    <neura::file-manager :items="$tree" />
</div>

<neura::file-manager
    :items="$tree"
    x-on:file-manager:delete="$wire.deleteFiles($event.detail.items)"
    x-on:file-manager:navigate="$wire.loadFolder($event.detail.path)"
/>

Events

  • file-manager:open — Open in the preview (or double-click / Enter with :preview="false")
  • file-manager:preview — a file shown in the preview (item, path)
  • file-manager:navigate — folder change (path, folder)
  • file-manager:select — selection changed (items)
  • file-manager:download / file-manager:delete — actions on the selection
  • file-manager:rename — a name changed in place (items, name, path)
  • file-manager:new-folder — a folder named in place (name, path)
  • file-manager:upload — files picked or dropped (files, path, uploads); upload-cancel / upload-retry
  • file-manager:upload-request — Upload with :upload-picker="false"
  • file-manager:copy — a copy pasted (items, target)
  • file-manager:filter / file-manager:shortcut / file-manager:thumb-size / file-manager:star
  • file-manager:sort / file-manager:view — display preferences
  • file-manager:reorder — drag to reorder (order, items, position)
  • file-manager:move — drop into a folder, Move or a cut pasted (items, target, position: inside)

Sent back by your app: file-manager:progress, file-manager:uploaded, file-manager:failed (see Uploads).

Sort

Column headers and the sort menu cover name, size, modified, and kind. With sortable (on by default), drag items to reorder them, or drop them on the center of a folder to move them in. The sort then becomes manual .
blade
selected

Folders

Files

Drop to upload

<neura::file-manager
    :items="$tree"
    sort="manual"
    x-on:file-manager:reorder="$wire.persistOrder($event.detail)"
    x-on:file-manager:move="$wire.moveItems($event.detail)"
/>

<neura::file-manager :items="$tree" :sortable="false" />

Context menu

A right-click on an item offers open, download, rename, and delete. On empty space it offers a new folder, upload, or select all. Dropping files on the browser shows a drop target and dispatches file-manager:upload .
blade
selected

Folders

Files

Drop to upload

<neura::file-manager
    :items="$tree"
    :renamable="true"
    :deletable="true"
    x-on:file-manager:rename="$wire.rename($event.detail.items[0])"
    x-on:file-manager:upload="$wire.upload($event.detail.files)"
/>

Search

Search has three levers you can combine: searchScope (the current folder, or the whole tree), searchMatcher (your own match function), and searchMode (filter in the browser, or ask the server).

Your matcher

Pass the name of a function (entry, query, manager) => boolean , or a dotted path such as App.search.files so it does not sit on window . The demo below understands type:pdf , >10mb , and an extension.
javascript
selected

Folders

Files

Drop to upload

window.searchFiles = (entry, query, manager) => {
    if (query.startsWith('type:')) return entry.kind === query.slice(5);
    if (query.startsWith('.')) return entry.extension.toLowerCase() === query.slice(1);

    return (entry.name + ' ' + (entry.tags ?? []).join(' '))
        .toLowerCase()
        .includes(query);
};

<neura::file-manager
    :items="$tree"
    search-matcher="searchFiles"
    search-scope="all"
    search-placeholder="type:pdf, .png…"
/>

What the function receives

  • entry — the decorated item: name, kind, extension, size, modifiedAt, isFolder, pathNames, plus your own fields
  • query — the input, already trimmed and lowercased
  • manager — the component, so you can read path, searchScope, and the rest

Server search

With search-mode="remote" the browser does not filter. The component dispatches file-manager:search after search-delay (300 ms by default) and shows a waiting state. Put the results back into items .
PHP
<neura::file-manager
    :items="$results"
    :loading="$searching"
    search-mode="remote"
    :search-delay="400"
    x-on:file-manager:search="$wire.searchFiles($event.detail.query, $event.detail.path)"
/>

public array $results = [];
public bool $searching = false;

public function searchFiles(string $query, array $path): void
{
    $this->searching = true;

    $this->results = Media::query()
        ->when($query, fn ($q) => $q->whereFullText('name', $query))
        ->get()
        ->map(fn ($m) => ['id' => $m->id, 'name' => $m->name, 'size' => $m->size])
        ->all();

    $this->searching = false;
}

Loading

:loading="true" shows a skeleton sized to the rows, so the layout does not jump when the data arrives.
blade
selected

Folders

Files

Drop to upload

<neura::file-manager :items="$tree" :loading="$loading" />

Keyboard

Move the selection ↑ / ↓
Move in the grid ← / →
Open the folder, or preview the file Enter
Preview the file Space
Toggle the check Ctrl / ⌘ + Space
Rename in place F2
Copy, cut, paste Ctrl / ⌘ + C / X / V
Go up one level Backspace
Select all Ctrl / ⌘ + A
Select a range Shift + click
Add to the selection Ctrl / ⌘ + click
Dispatch the delete action Delete
Clear the selection, or drop a cut Escape
Previous or next file ← / → in the preview

Props

Property Type Default Description
itemsarray[] The tree. Folders carry children.
viewstring'list' First layout: list or grid.
sizestring'md' Density: sm, md, or lg.
sortstring'name' First sort: name, size, modified, kind, or manual.
directionstring'asc' First sort direction.
sortablebooltrue Drag to reorder, or drop onto a folder to move.
selectablebooltrue Allow selecting items.
multiplebooltrue Allow Shift, Ctrl, and select-all.
searchablebooltrue Show the search field.
searchScopestring'folder' folder for the current folder, or all for the whole tree. Each result shows its path.
searchMatcherstring|nullnull Global name or dotted path of (entry, query, manager) => bool.
searchModestring'local' local filters in the browser. remote dispatches file-manager:search.
searchDelayint300 Wait before a remote search, in milliseconds.
searchPlaceholder / scopeTogglestring|null / boolnull / true Placeholder text, and whether the scope switch is shown.
detailsbooltrue Show the details panel.
uploadable / creatablebooltrue Show Upload and New folder.
downloadable / deletablebooltrue Show those actions on rows, the selection, and the context menu.
renamablebooltrue Show Rename in the context menu. Dispatches file-manager:rename.
colorstringprimary Accent of the selection, focus, chips and progress (config file-manager.default.color).
thumbSizeint3 Card size in the grid, 1 to 5; the slider dispatches thumb-size.
filtersbooltrue Type chips under the toolbar.
sidebarboolfalse Side panel with shortcuts and the folder tree.
shortcutsarray[] [['id', 'label', 'icon']] in the side panel; a click dispatches shortcut.
inlineCreatebooltrue New folder adds a row being named; off, the button only dispatches new-folder.
previewbooltrue Quick look over the file manager; off, opening a file dispatches open.
uploadPickerbooltrue Upload opens the file picker; off, it dispatches upload-request.
starrableboolfalse Stars on files and in the menu; dispatches star.
loadingboolfalse Show the skeleton instead of the list.
rootLabelstring'Home' Root label in the breadcrumb.
heightstringnull Fixed height, for example 28rem.
rounded / shadowstringglobal Design-system overrides.