Skip to content

armgit / pdfcn

Public Imported from GitHub
0

Beautiful pdf components, built on Takumi and Forme. 100% Free, Zero config, one command setup.

1.1 KB
Raw Blame
import { Document, Page } from "@formepdf/react";

import { PdfForm } from "@/registry/bases/forme/components/form/form";

const DemoBody = () => (
  <PdfForm
    title="Job Application"
    subtitle="Please complete all fields clearly in block capitals."
    variant="underline"
    groups={[
      {
        fields: [
          { hint: "First and last name", label: "Full Name" },
          { hint: "DD / MM / YYYY", label: "Date of Birth" },
          { label: "Email Address" },
          { hint: "+1 (555) 000-0000", label: "Phone Number" },
        ],
        title: "Personal Information",
      },
      {
        fields: [
          { label: "Street Address", width: "100%" },
          { label: "City" },
          { label: "State / Province" },
          { label: "Postal Code" },
        ],
        layout: "two-column",
        title: "Address",
      },
      {
        fields: [{ height: 60, label: "Cover Letter" }],
        title: "Additional Information",
      },
    ]}
  />
);

const Demo = () => (
  <Document>
    <Page size="A4" margin={40}>
      <DemoBody />
    </Page>
  </Document>
);

export default Demo;