ReboFilesDocs
Start3
What is ReboFiles
Getting started
Demos to run
Put it in your app6
React component
Headless: your own UI
Without a framework
Styling and themes
Keyboard and accessibility
Languages
Files9
Uploads
Previews and the viewer
Search
Live changes and large folders
Comments
Starred and fields
Versions, trash and space
Download as .zip
Word documents
The server14
The route
Frameworks and sign-in
Who may do what
Storage: S3, GCS, Azure and disk
Checking uploads
Metadata: SQLite and Postgres
Database schema
Sharing and links
Activity and notifications
Hooks, logs and limits
Retention, holds and export
Desktop and other origins
Sync a folder
Going to production
Together1
AI assistants (MCP)
Reference5
Packages
Components and hooks
Client API
HTTP routes
Status and roadmap
↑↓ to move↵ to openEsc to close38 pages

Reference Components and hooks

Components and hooks

What an application of React needs is in this one package; what it shares with the drive without a framework is exported from it too.
All

Exports

NameWhat it is
FileDriveThe whole drive.
SharedLinkWhat someone sent a link sees, without signing in.
createMemoryClientThe drive kept in the page, with the client of the server’s routes.
createDriveClient, createLinkClientThe clients, from @rebofiles/drive.
RequestErrorWhat the server refused: its status, its code and its message.
TEXTS, formatSize, formatDate, formatDuration, kindOfThe words, and what is said of a file.
@rebofiles/react/rebodocspreviewDocx, viewDocx, thumbDocx, pictureOfDocx, textOfDocx: Word documents by Rebodocs’ engine.
Hooks

Hooks

HookWhat it does
DriveProviderThe client and the words, for every hook under it. base, client, headers, language, texts, live; a <FileDrive> inside it uses the same. Every hook asks again when someone else changes the drive.
useEntriesA folder, Recent, Starred, what came through requests, Shared with me, the trash or a search. entries, path, loading, error, refresh: asked again after every change.
useEntryOne entry as it is now, and where it is. entry, path, trashed; null while it loads, or when there is none.
useActionsWhat changes the drive, telling every hook after. createFolder, rename, move, moveToTrash, restore, deleteForever, emptyTrash, restoreVersion, copy, star, setColor, setFields, review, share, unshare, createLink, removeLink, linkToken, upload, url.
useUploadsFiles going up, three at a time, with the time each has left. uploads, summary, upload, retry, stop, stopAll, decide, dismiss, clear; { check: true } to ask about what is there already.
useSettingsThe drive’s settings and the person’s own. settings, drive, mine, canConfigure, save, saveMine.
useCommentsWhat is said of an entry, and saying more. comments, loading, error, add, edit, resolve, remove.
useActivityWho did what to an entry, the newest first. activity, loading, error; useActivity(id, limit?).
useTextSearchThe files with these words written inside, each with a piece of its text. results (entry, snippet), loading, error; none for an empty query.
useNotificationsWhat the one asking was told, and how many are new. notifications, unseen, loading, error, saw().
useRequestsThe requests for files one has made. requests (folder, link, token), loading, error, remind(folder, link).
useExpiringThe files whose field expires comes within so many days, or passed: the soonest first. files (entry, expires, days), loading, error; useExpiring(days?), 15 unless said.
useWithFieldThe entries with a field of this value: the files of one record of yours. entries, loading, error; none without a value.
usePeopleWho matches what is typed, from your directory, to share with. people, loading, error; none for an empty query.
useDriveThe provider itself. client, revision, changed(), t, locale, settings: every route as a function, a number that goes up after each change, and the drive’s words. For what has no hook of its own.
Props

Every prop of <FileDrive>

PropTypeWhat it does
basestringWhere the routes of @rebofiles/server are. /api/files unless said.
clientDriveClientA client of your own instead of base: the drive kept in the page (createMemoryClient), or one shared with the rest of the page.
headers() => Record<string, string>Headers for every request to your server, such as a token of the session; never sent to the bucket. May be async.
linkAddress(token) => stringWhere a link of the drive points: your page with <SharedLink>. This page with ?link= unless given.
settingsbooleanfalse leaves out the screen of settings and the button that opens it.
language'en' | 'es' | 'zh'Under each person’s own choice, over the drive’s. English unless given.
textsTextsThe words of another language, with the keys of TEXTS.en.
theme'light' | 'dark' | 'auto'Under each person’s own choice, over the drive’s. auto follows the system.
titlestringThe name over the drive: your application’s, or “Files”.
defaultView'list' | 'grid'How a folder is shown the first time.
layout'full' | 'compact'compact: no column on the left; New and the places in a strip over the list, for a drive in a smaller part of a page.
classNamestringA class of your own on .rf-drive, for its custom properties.
chromebooleanfalse leaves out its bar and its sections, for your application’s own around it: it drives it with go, search, upload, newFolder, requestFiles, share, openSettings.
rootEntryIdThe folder it is kept in, as the files of one record of yours: it starts there, its path starts there, nothing above it.
onState(state) => voidWhere it is, each time that changes: the section, the folder and its path, what is searched, how many, the space; for your own bar.
controlsRefObject<DriveControls>React: the drive’s go, search, upload, newFolder, requestFiles, share and openSettings, put in it while it is there.
checkUploadsbooleanfalse uploads without looking for the same file, or one of its name, in the drive first: a taken name is made free with “(2)”.
requestTemplatesbooleanfalse leaves out the templates of requests: to start one from, and to save one as.
qrbooleanfalse leaves out the QR code of a request made.
onOpen(file, url) => voidA file opened by a double click or Enter, your own way. Unless given, the drive’s viewer shows it.
fields'show' | 'edit' | falseThe fields of your application on an entry, in its details: shown (as it comes), changed there by who may rename it (edit), or left out.
previewDocument(bytes) => DocumentPreviewThe details of a .docx: its title and first paragraphs. previewDocx.
viewDocument(element, bytes) => ShownDocumentThe viewer of a .docx: its pages, one by one or all, with Rebodocs’ zoom and print. viewDocx.
thumbDocument(bytes) => Promise<HTMLElement>Its first page drawn in the grid, until a picture of it is made. thumbDocx.
pictureDocument(bytes, size, type, quality) => Promise<Blob>Its first page as a picture, made at upload and kept as its thumbnail in the drive’s sizes. pictureOfDocx.
textDocument(bytes) => stringWhat is written in it, sent at upload, for a search to find it by. textOfDocx.
onOpenDocument(file, url) => voidGives a .docx an “Open in Rebodocs” button, called with an address to read it from.
compareDocument(element, before, after) => ShownDocument“Compare” on each version but the current, in the history: what changed, over its pages. compareDocx.
newDocument() => Uint8Array“New document” in the Upload menu: an empty .docx named by the person, in the folder they are in, then opened. newDocx.
onChange() => voidAfter every change made from the drive, for what else in the page shows it (mountDrive; in React, the provider tells the hooks).
livebooleanWhat others change, shown as it happens, from the server’s /events. true unless said; in React, the provider’s.

By what they are for, with examples: React component.