Skip to content
v0.2.10

FileMeta

A compact combined file-format and byte-size chip.

Preview
PDF2.4 MB

Use FileMeta

FileMeta is a named export of @flood-md/react. Connect the package once, then import what you use.

First time here? Connect Flood
Example import style
file-meta.tsxTSX
"use client";

import { FloodRoot, FileMeta } from "@flood-md/react";
import "@flood-md/react/styles.css";

export function Example() {
  return (
    <FloodRoot>
      <FileMeta format="PDF" size={2400000} />
    </FloodRoot>
  );
}

Design notes

  • The format label is display metadata, not validated MIME detection.
  • Size uses SI units; formatSize customizes the text. Missing values do not create empty chip slots. Long metadata may wrap inside its single Badge at enlarged or constrained widths.

API reference

PropValuesDefault
formatstring—
sizenumber—
formatSize(bytes: number) => string—
Native HTML propsOmit<HTMLAttributes<HTMLSpanElement>, "children">Forwarded
View TypeScript source