SignatureKit

React components

Install SignatureKit's shadcn registry components into your app and own the UI code.

@signature-kit/react is hooks-only. Install UI with the shadcn registry when you want a ready path; the generated files land in your app, so storage, copy, styling, fetch/tRPC, and product behavior stay yours.

title="Install one component"

npx shadcn@latest add https://signaturekit.dev/r/signature-dialog.json

Registry items

ItemCommandUse it for
signature-certificate-formnpx shadcn@latest add https://signaturekit.dev/r/signature-certificate-form.jsonPassword confirmation with callback-owned getSavedPassword / onSavePassword.
certificate-upload-formnpx shadcn@latest add https://signaturekit.dev/r/certificate-upload-form.jsonPick .pfx / .p12, parse it in the browser with useA1Certificate, preview metadata, then call your upload callback.
signature-pdf-viewernpx shadcn@latest add https://signaturekit.dev/r/signature-pdf-viewer.jsonreact-pdf preview with text-anchor highlighting and manual click-to-place rectangles.
signature-dialognpx shadcn@latest add https://signaturekit.dev/r/signature-dialog.jsonDirect A1 signing flow around useA1Signer, saved-password retry, progress, and signed-PDF download preview.
signing-progress-listnpx shadcn@latest add https://signaturekit.dev/r/signing-progress-list.jsonStandalone per-document status rows for a custom signing screen.
pdf-signature-anchornpx shadcn@latest add https://signaturekit.dev/r/pdf-signature-anchor.jsonInvisible takumi-pdf text and URI link markers paired with findPdfTextAnchors.

Direct signing dialog

title="sign-button.tsx"

import { SignatureDialog } from "@/components/signature-dialog"

export function SignButton({ pfx }: { pfx: Uint8Array }) {
  return (
    <SignatureDialog
      pfx={pfx}
      anchorTokens={["{{signature}}"]}
      getSavedPassword={() => null}
      onWrongPassword={() => {
        // Clear your app-owned password storage here.
      }}
      buildDocuments={async () => [
        {
          id: "contract",
          name: "contract.pdf",
          pdf: await fetch("/contract.pdf").then(async (response) =>
            new Uint8Array(await response.arrayBuffer()),
          ),
          anchors: {
            matchers: [{ text: "{{signature}}" }],
            stampSize: { width: 180, height: 54 },
          },
        },
      ]}
      signing={{ policy: "pades-icp-brasil", reason: "Signed with SignatureKit" }}
      stamp={{
        badge: {
          header: { text: "DIGITALLY SIGNED" },
          rows: [[{ label: "Signer", value: "Current user" }]],
          footer: [{ text: "ICP-Brasil" }, { text: "SignatureKit" }],
        },
        rubric: { initials: "CU" },
      }}
      onSigned={(rows) => {
        // Upload, preview, or download rows[n].signedPdf.
      }}
    />
  )
}

Anchor-first placement

Use invisible anchors when you generate PDFs with takumi-pdf. Text and link variants pair with findPdfTextAnchors matchers.

title="contract.tsx"

import { render } from "takumi-pdf"
import {
  PdfSignatureAnchor,
  PdfSignatureLinkAnchor,
} from "@/components/signature-kit/pdf-signature-anchor"

export async function buildContractPdf(fontBytes: Uint8Array) {
  return render(
    <main className="p-12 text-[11px]">
      <p>Signer</p>
      <div className="mt-4 flex flex-col items-center gap-1">
        <PdfSignatureAnchor token="{{signature}}" />
        <PdfSignatureLinkAnchor href="https://signature.invalid/anchor" />
      </div>
    </main>,
    { size: "a4", fonts: [{ name: "Liberation", data: fontBytes }] },
  )
}

See Anchor-based placement for the full generate → findPdfTextAnchors → prepareAndSignPdf flow.

Use signature-pdf-viewer when a human needs to confirm anchor results or switch to manual click-to-place.

Waku/FumaPress react-pdf island

react-pdf touches browser APIs, so keep it behind the hydration boundary shown in PdfPreviewIsland. Use useSyncExternalStore to expose a server snapshot of false, lazy to defer the browser-only module, and Suspense for the loading fallback. Waku/FumaPress pages can pass validated PDF bytes, pages, and rectangles into that island; it owns preview state and object URLs without a framework-specific client-loading helper.

How is this guide?