GitHub

FileViewerContent

The layout row below the header, usually containing a sidebar and an inset.

FileViewerContent owns the space below FileViewerHeader. It is the boundary between optional file-scoped navigation and the main file inset.

<FileViewerContent>
  <FileViewerSidebar aria-label="PDF pages" />
  <FileViewerInset>
    <FileViewerViewport>
      <FileViewerDocument />
    </FileViewerViewport>
  </FileViewerInset>
</FileViewerContent>

FileViewerContent can also hold an inset alone, with no sidebar:

<FileViewerContent>
  <FileViewerInset>
    <FileViewerViewport>
      <FileViewerDocument />
    </FileViewerViewport>
  </FileViewerInset>
</FileViewerContent>

Behavior

  • Renders a data-slot="file-viewer-content" row that fills the remaining height below the header and lays out the sidebar beside the inset.
  • It is purely structural: it does not know whether the sidebar contains thumbnails, attachments, segments, or source fields, and it does not own sidebar open/collapse state — that lives on FileViewerProvider.
  • Sidebar placement (side, width, inline vs. overlay) is resolved from FileViewer and the FileViewerSidebar inside the content row.

API Reference

PropTypeDescription
childrenReact.ReactNodeTypically a FileViewerSidebar and a FileViewerInset.
...propsReact.ComponentProps<"div">Standard content props; className is forwarded.

Source

file-viewer.tsx