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

Put it in your app React component

React component

<FileDrive> is the whole drive: the search, the sections, the list and the grid, the details, the viewer, uploads, sharing and the settings. It takes the height it is given and asks nothing of your CSS.
Start

Put it in a page

A client component, in an element with a height. With Rebodocs installed, Word documents are read by its engine.

app/files/page.tsx
'use client';
import { FileDrive } from '@rebofiles/react';
import { pictureOfDocx, previewDocx, textOfDocx, thumbDocx, viewDocx } from '@rebofiles/react/rebodocs';

export default function Files() {
  return (
    <div style={{ height: 'calc(100vh - 64px)' }}>
      <FileDrive
        base="/api/files"
        title="Acme Files"
        language="es"
        theme="auto"
        headers={async () => ({ authorization: `Bearer ${await token()}` })}
        linkAddress={(token) => `${location.origin}/shared?link=${token}`}
        previewDocument={previewDocx}
        viewDocument={viewDocx}
        thumbDocument={thumbDocx}
        pictureDocument={pictureOfDocx}
        textDocument={textOfDocx}
      />
    </div>
  );
}
Props

Props: server

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.
Props

Props: look

PropTypeWhat it does
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.
Props

Props: files

PropTypeWhat it does
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.
Props

Props: Word documents

PropTypeWhat it does
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.
Props

Props: events

PropTypeWhat it does
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.
Sharing

What someone sent a link sees, without signing in: what it reads, its folders, a .zip of them; its password asked first when it has one.

app/shared/page.tsx
'use client';
import { SharedLink } from '@rebofiles/react';
import { useSearchParams } from 'next/navigation';

export default function Shared() {
  return <SharedLink base="/api/files" token={useSearchParams().get('link') ?? ''} theme="auto" />;
}

Point the drive’s links at it with linkAddress.

Know

When a prop changes

  • language, theme, title and the callbacks are taken as they change, without starting again.
  • base, client or headers make the drive’s client again; what was going up goes on with the old one.
  • Inside a <DriveProvider> of yours, it uses that one’s client and words: what it does, your hooks see.