OptionalactiveCurrently selected scope. Required when scopesAvailable has more than one entry.
OptionalavailableAvailable tabs for smart opening
OptionalclientLongest edge of generated client-side thumbnails, in pixels.
Ignored when enableClientThumbnails is false.
OptionalcolorsCustom colors for theming
OptionalcolumnsColumns to display in the file list
OptionalcontrolledExternally control the inline FileViewer's open state. Pass a
FileEntry to open the viewer for that file, null to close it.
Leave undefined to keep the viewer fully uncontrolled (default).
Useful for presenter-sync style flows where one client drives which file the rest of the room is viewing.
OptionalcurrentCurrent folder path (e.g., '/', '/Notes', '/Recordings/2024'). When inside FileCacheProvider, this is managed internally unless overridden.
OptionalcurrentCurrent user ID (used to determine edit permissions on markers)
OptionalcustomCustom toolbar action
OptionalcustomCustom context menu actions for files (appended after built-in actions)
OptionalcustomCustom filter dropdowns rendered in the toolbar alongside search and sort
OptionalcustomCustom viewer renderers for specific resource types. These are passed to FileViewer for rendering custom file types.
OptionaldefaultLabel of the filter chip to select by default. When provided, this chip is active on mount instead of "All".
OptionaldefaultDefault sort column when neither a controlled value nor a stored
preference exists. Falls back to 'name' when omitted. Useful for
letting an app-level preference drive the initial sort across many
FileManager instances without overriding a user's per-instance
choice (which lives in sortStorageKey localStorage).
OptionaldefaultDefault sort direction paired with defaultSortColumn. Falls back
to 'asc' when omitted. Same precedence rule: per-instance
localStorage wins, then this default, then the built-in fallback.
OptionaldefaultDefault view mode when uncontrolled
OptionalenableEnable broadcasting media audio into a Hiyve room via the rtc-client
audio merger. Forwarded to the inner FileViewer → MediaFileViewer
→ MediaPlayer. Consumers must mount the passthrough bridge
(useMediaPassthroughBridge from @hiyve/react) once at room scope
to route the resulting events to their client. The room/client must
have been connected with enableAudioMerge: true.
OptionalenableEnable client-side thumbnail generation for card view.
When true and onGetFileUrl is provided, card-view tiles lazily run a
thumbnail generator for each file that enters the viewport and cache the
resulting image in IndexedDB. Subsequent visits serve thumbnails from the
cache with no network cost. Generation is serialized, so only one file
downloads/renders at a time.
Built-in generators cover images, videos/recordings, text-based resources
(notes, assignments, transcripts), and a synthetic placeholder for
everything except audio. Use thumbnailGenerators to add custom ones.
file.thumbnailUrl and getThumbnailUrl take precedence when set.
OptionalenableWhether to enable drag-and-drop file moving
OptionalenableEnable timeline markers for audio/video files
OptionalenableWhether to enable multi-file selection
OptionalenableEnable region creation and loop playback for audio/video files
OptionalenableEnable smart opening (open whiteboards/notes in their respective tabs)
OptionalfieldCustom formatters for file list columns. Each key is a column name, and the value is a function that receives the file and returns a display string. The formatter's return value replaces the default cell text.
OptionalfileCustom file name formatter
OptionalfilesArray of files in current folder. When inside FileCacheProvider, this is derived from context unless overridden.
OptionalfilterResource types to show first in auto-generated filter chips.
Types not in this list appear after, sorted alphabetically.
Only used when filterChips is not provided.
OptionalfilterFilter chip definitions to render between toolbar and content. When provided, a chip bar is shown allowing users to filter by resource type. The first chip is selected by default.
OptionalfilterFilter to specific file types (forces flat view)
OptionalfoldersArray of subfolders in current folder. When inside FileCacheProvider, this is derived from context unless overridden.
OptionalgetReturn the number of comments on a file (for badge display on file rows/cards). When provided, files with count > 0 show a comment icon.
OptionalgetResolve a thumbnail/preview image URL for a file.
When provided and returning a URL, card-view tiles render it as a banner at the top
of the card. file.thumbnailUrl (when set on the entry) takes precedence.
OptionaliconsCustom icons
OptionalisWhether download is in progress (managed internally when inside FileCacheProvider)
OptionalisDetermine whether a file's "Shared" badge should appear on its
row/card. When omitted, the badge shows whenever the file has
any sharee (file.shared.length > 0). Override to scope by
audience — e.g. inside a live room, hide the badge unless the
file is actually shared with at least one current participant.
OptionalisWhether files are currently loading. When inside FileCacheProvider, this is derived from context unless overridden.
OptionalisWhether refresh is in progress (managed internally when inside FileCacheProvider)
OptionalisWhether current user is room owner (derived from context when inside FileCacheProvider)
OptionalisWhether upload is in progress (managed internally when inside FileCacheProvider)
OptionalisWhether the component is visible (for lazy loading)
OptionallabelsCustom labels for internationalization
OptionalonAdd a new comment to a file
OptionalonServer-side clone a public file into the caller's private files (copy-on-write).
Called when the user triggers copy/duplicate/move on a public file. Must return
the newly-created private FileEntry. Typically cloudClient.copyFileToPrivate
via usePublicFiles().copyToPrivate.
OptionalonCreate a new folder
OptionalonDelete files
OptionalonDelete a comment from a file
OptionalonDelete a folder
OptionalonDownload a file or files
OptionalonEdit a comment on a file
OptionalonGet list of available file types for filtering
OptionalonCallback fired when the file count changes (useful for conditional UI)
OptionalonCallback when a file should be opened in an editor (for types without inline viewers). If provided, prevents the fallback "no preview" viewer from opening.
OptionalonHandle double-click to open file. This is always called when a file is opened.
OptionalonGet attendees for sharing dialog
OptionalonGet comments for a specific file. When provided, enables the comments panel. Called when a file is selected and the comments panel is opened.
OptionalonGet presigned URL for file viewing
OptionalonGet saved timeline markers for a specific file
OptionalonGet saved regions for a specific file
OptionalonCalled when a new timeline marker is added
OptionalonCalled when a timeline marker is updated
OptionalonCalled when a timeline marker is deleted
OptionalonMove file(s) to a new location
OptionalonNavigate to a folder path. When inside FileCacheProvider, this is auto-wired unless overridden.
OptionalonOptionalonFires when the inline PDF viewer's active page changes. The teacher's presenter-sync wiring listens here and rebroadcasts. Forwarded to FileViewerProps.onPdfPageChange.
OptionalonRefresh the file list. When inside FileCacheProvider, this is auto-wired unless overridden.
OptionalonCalled when a named region is created or updated
OptionalonCalled when a named region is deleted
OptionalonRename a file
OptionalonCalled when the user changes scope via the selector.
OptionalonCallback when a file is selected
OptionalonShare files with users
OptionalonCallback when switching to a specific tab (for smart opening)
OptionalonUpload a file. Returns void or throws on error.
OptionalonCalled whenever the inline FileViewer opens a new file or closes (local user action). Use this to broadcast the viewer state to other clients in a presenter-sync setup.
OptionalonCallback when view mode changes
OptionalpdfOptionalpdfOptionalpdfOptionalpdfHide the PDF toolbar and ignore page-navigation input. Lock followers to the presenter's page. Forwarded to FileViewerProps.pdfControlsDisabled.
OptionalpdfOptionalpdfControlled current page (1-based) for the inline PDF viewer. When set, the viewer scrolls to this page. Forwarded to FileViewerProps.pdfPage. Used by lesson presenter-sync to follow a teacher's page.
OptionalpublicFile list used when activeScope === 'public-files'. Normally sourced from
usePublicFiles() in the Muzie app.
OptionalrefreshTrigger refresh from parent (increment to trigger refresh)
OptionalrenderRender props for advanced customization
OptionalrenderCustom render function for the sharing dialog's user selection area. When provided, replaces the default checkbox user list in the share dialog.
files is the set of files being shared, so consumers can filter
the candidate-user list per the file's context (e.g. members of the
file's classroom only).
OptionalresolveResolve a userId to a friendly display name. Forwarded to the embedded FileViewer (and from there to the room-summary viewer) so teacher-assigned student nicknames, authenticated user profile names, etc. take precedence over server-stored placeholders. Lesson contexts should pass their app-level resolver here.
OptionalresourceCustomize the mapping of resource types to sidebar tab names for smart opening.
When a file is double-clicked and has no inline viewer, this mapping determines
which tab to switch to via onSwitchToTab.
// Add a custom resource type that opens in a "documents" tab
<FileManager resourceTabMapping={{ add: { 'custom-doc': 'documents' } }} />
// Remove a mapping so it falls through to the file viewer
<FileManager resourceTabMapping={{ remove: ['whiteboard'] }} />
// Replace the entire mapping
<FileManager resourceTabMapping={{ replace: { notes: 'notes', whiteboard: 'board' } }} />
OptionalresourceOverride which resource types open in the inline FileViewer. By default, types like image, video, pdf, room-summary, etc. open in the viewer. Types not in this set (e.g., whiteboard, notes) route to tab switching instead.
// Add a custom type to the viewer set
<FileManager resourceViewerTypes={{ add: ['my-custom-type'] }} />
// Remove a type so it routes to tab switching
<FileManager resourceViewerTypes={{ remove: ['room-summary'] }} />
// Replace the entire set
<FileManager resourceViewerTypes={{ replace: ['image', 'video', 'pdf'] }} />
OptionalroomRoom name (derived from context when inside FileCacheProvider)
OptionalrowPer-resource-type row extras. The renderer is called for every file of the
given resourceType and its return value is shown inline in the file row's
metadata line (alongside the date and owner). Return null/undefined to
skip rendering for a specific file — useful when the value depends on data
that may not yet be populated (e.g. an appData field written on save).
OptionalscopesWhich scopes are available to the current user.
Supply both 'private-files' and 'public-files' to render the scope selector.
A single-entry array renders the selected scope with no selector. An empty or
omitted array falls back to the historical behavior (private files only, no selector).
OptionalshowWhether to show both owned and shared files
OptionalshowWhether to show breadcrumb navigation
OptionalshowWhether to show only files shared with user
OptionalshowWhether to show the toolbar
OptionalsortlocalStorage key for persisting sort state. When provided, sort column and direction are saved and restored across sessions.
OptionalstylesCustom style values
OptionalsxMUI sx styling prop
OptionalthumbnailCustom thumbnail generators, prepended to the SDK's built-in list.
The first generator whose canHandle(file) returns true produces the
thumbnail — so custom generators for app-specific file types (e.g. a
clip composition whose first video clip should be used) win over the
built-ins. Ignored when enableClientThumbnails is false.
const clipCompositionGenerator: ThumbnailGenerator = {
name: 'clip-composition',
canHandle: (f) => f.resourceType === 'clip-composition',
generate: async ({ file, getFileUrl, maxDimension }) => {
const json = await fetch(await getFileUrl(file)).then((r) => r.json());
const firstVideo = json.clips.find((c) => c.type === 'video');
if (!firstVideo) return undefined;
const videoUrl = await getFileUrl({ ...firstVideo });
return generateVideoThumbnailFromUrl(videoUrl, maxDimension);
},
};
OptionaluserCurrent user's ID. When inside FileCacheProvider, this is derived from context unless overridden.
OptionalviewerFileViewer layout: 'fullscreen' covers viewport, 'inline' stays within parent
OptionalviewControlled view mode (table or card). When provided, the component is controlled.
Props for the FileManager component.
Remarks
Requirement: Must be used inside a
<FileCacheProvider>component (which itself must be inside a<HiyveProvider>) for automatic state management.When used inside
FileCacheProvider:onFileOpenis required to handle file selectionWhen used standalone (without FileCacheProvider):
Example
Example
Example