0
Files
app/annotator/page.tsx
"use client";

import dynamic from "next/dynamic";

// embedpdf's plugin packages and the PDFium worker are browser-only, so the
// whole app is loaded client-side behind an `ssr: false` boundary.
const PdfAnnotatorApp = dynamic(
  () =>
    import("@/components/pdf-annotator-app").then(
      (mod) => mod.PdfAnnotatorApp,
    ),
  {
    ssr: false,
    loading: () => <div className="bg-muted h-full w-full" />,
  },
);

export default function Page() {
  return (
    // The editor fills its container and scrolls inside itself, so pin an
    // explicit height here rather than letting the document grow the page.
    <div className="h-svh w-full overflow-hidden">
      <PdfAnnotatorApp documents={[{ url: "/sample.pdf" }]} />
    </div>
  );
}

The same components with the priorities reversed — marking up the document is the job, so the surface that supports it is on screen from the first frame. Three regions after Figma: a tool pill floating over the canvas that never sheds, an annotations index for what's in the document, and a style inspector for what the selection looks like.