Blocks / Document header and parties

Document header and parties

The parts of a business document: title block, from and to, details table.

import { DocumentHeader, PartyBlock, MetaTable } from "@forgeron/ui";
/01 → Default
Atelier Exemple

Invoice

INV-2026-0042

Sent

From

Atelier Exemple

1 Test Street

00000 Sampletown

Tax ID XX000000

Bill to

Client Exemple

2 Sample Avenue

00000 Sampletown

Issued
2026-11-19
Due
2026-12-19
Reference
PO-7781
import { DocumentHeader, MetaTable, PartyBlock, StatusBadge } from "@forgeron/ui";

export default function Default() {
  return (
    <div style={{ display: "grid", gap: 24, width: 560, maxWidth: "100%" }}>
      <DocumentHeader
        title="Invoice"
        number="INV-2026-0042"
        brand={<strong>Atelier Exemple</strong>}
        status={<StatusBadge status="sent" />}
      />
      <div style={{ display: "grid", gridTemplateColumns: "1fr 1fr", gap: 24 }}>
        <PartyBlock
          label="From"
          name="Atelier Exemple"
          lines={["1 Test Street", "00000 Sampletown", "Tax ID XX000000"]}
        />
        <PartyBlock
          label="Bill to"
          name="Client Exemple"
          lines={["2 Sample Avenue", "00000 Sampletown"]}
        />
      </div>
      <MetaTable
        rows={[
          { label: "Issued", value: "2026-11-19" },
          { label: "Due", value: "2026-12-19" },
          { label: "Reference", value: "PO-7781" },
        ]}
      />
    </div>
  );
}
API → Props
PropTypeDefaultDescription
DocumentHeader title / number / status / brandReactNode—The mark of the sender one side, the title and number the other.
PartyBlock label / name / linesstring / ReactNode / ReactNode[]—Who it is from, who it is for: the address lines.
MetaTable rows{ label, value }[]—Issue date, due date, reference, terms.