GitHub

FileViewerMeta

Passive file metadata beside the File Viewer title.

FileViewerMeta renders passive facts for the active file, such as MIME type or resolved renderer category. It is separate from FileViewerTitle so header composition stays explicit.

<FileViewerMeta visibility="responsive" />

Behavior

  • Reads MIME type and category from file viewer context.
  • Renders nothing when no metadata is available.
  • Renders data-slot="file-viewer-meta" with truncating text.
  • visibility="responsive" hides metadata on small screens.

API Reference

PropTypeDescription
visibility"responsive" | "visible"Metadata visibility. Defaults to responsive.
...propsReact.ComponentProps<"span">Standard span props; className is merged.

Source

file-viewer-header.tsx