File Manager
Files
: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.
Folders
Files
Drop to upload
-
Waiting Cancelled
No preview for this file
<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.
Folders
Files
Drop to upload
-
Waiting Cancelled
No preview for this file
<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.
Folders
Files
Drop to upload
-
Waiting Cancelled
No preview for this file
<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
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
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
.
<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-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.
Folders
Files
Drop to upload
-
Waiting Cancelled
No preview for this file
<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
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
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
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.
Folders
Files
Drop to upload
-
Waiting Cancelled
No preview for this file
<neura::file-manager :items="$tree" color="info" />
Narrow and touch
starrable
, files get a star (file-manager:star
,
item
, starred
) — see the side panel example.
Compact
Folders
Files
Drop to upload
No preview for this file
<neura::file-manager
:items="$tree"
size="sm"
:selectable="false"
:details="false"
:uploadable="false"
:creatable="false"
:deletable="false"
/>
Events
file-manager:
event. Listen in Alpine or Livewire.
Folders
Files
Drop to upload
-
Waiting Cancelled
No preview for this file
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 selectionfile-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-retryfile-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:starfile-manager:sort/file-manager:view— display preferencesfile-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
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
.
Folders
Files
Drop to upload
-
Waiting Cancelled
No preview for this file
<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
file-manager:upload
.
Folders
Files
Drop to upload
-
Waiting Cancelled
No preview for this file
<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
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
(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.
Folders
Files
Drop to upload
-
Waiting Cancelled
No preview for this file
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 fieldsquery— the input, already trimmed and lowercasedmanager— the component, so you can readpath,searchScope, and the rest
Server search
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
.
<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.
Folders
Files
Drop to upload
-
Waiting Cancelled
No preview for this file
<neura::file-manager :items="$tree" :loading="$loading" />
Keyboard
Props
| Property | Type | Default | Description |
|---|---|---|---|
| items | array | [] |
The tree. Folders carry children. |
| view | string | 'list' |
First layout: list or grid. |
| size | string | 'md' |
Density: sm, md, or lg. |
| sort | string | 'name' |
First sort: name, size, modified, kind, or manual. |
| direction | string | 'asc' |
First sort direction. |
| sortable | bool | true |
Drag to reorder, or drop onto a folder to move. |
| selectable | bool | true |
Allow selecting items. |
| multiple | bool | true |
Allow Shift, Ctrl, and select-all. |
| searchable | bool | true |
Show the search field. |
| searchScope | string | 'folder' |
folder for the current folder, or all for the whole tree. Each result shows its path. |
| searchMatcher | string|null | null |
Global name or dotted path of (entry, query, manager) => bool. |
| searchMode | string | 'local' |
local filters in the browser. remote dispatches file-manager:search. |
| searchDelay | int | 300 |
Wait before a remote search, in milliseconds. |
| searchPlaceholder / scopeToggle | string|null / bool | null / true |
Placeholder text, and whether the scope switch is shown. |
| details | bool | true |
Show the details panel. |
| uploadable / creatable | bool | true |
Show Upload and New folder. |
| downloadable / deletable | bool | true |
Show those actions on rows, the selection, and the context menu. |
| renamable | bool | true |
Show Rename in the context menu. Dispatches file-manager:rename. |
| color | string | primary |
Accent of the selection, focus, chips and progress (config file-manager.default.color). |
| thumbSize | int | 3 |
Card size in the grid, 1 to 5; the slider dispatches thumb-size. |
| filters | bool | true |
Type chips under the toolbar. |
| sidebar | bool | false |
Side panel with shortcuts and the folder tree. |
| shortcuts | array | [] |
[['id', 'label', 'icon']] in the side panel; a click dispatches shortcut. |
| inlineCreate | bool | true |
New folder adds a row being named; off, the button only dispatches new-folder. |
| preview | bool | true |
Quick look over the file manager; off, opening a file dispatches open. |
| uploadPicker | bool | true |
Upload opens the file picker; off, it dispatches upload-request. |
| starrable | bool | false |
Stars on files and in the menu; dispatches star. |
| loading | bool | false |
Show the skeleton instead of the list. |
| rootLabel | string | 'Home' |
Root label in the breadcrumb. |
| height | string | null |
Fixed height, for example 28rem. |
| rounded / shadow | string | global |
Design-system overrides. |