About
A layout wrapper for grouping document content into spaced blocks with optional padding, border, background, and callout/highlight/card style variants, used when composing PDF-style pages.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds PDF Section to your project and fits it to your theme.
Code
How PDF Section is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import Section from "@/components/ui/pdf-section";
export default function SectionDemo() {
return (
<div className="mx-auto w-full max-w-xl rounded-lg border border-zinc-200 bg-white p-10 text-zinc-900 shadow-sm">
<Section variant="default" spacing="md">
<h2 className="font-serif text-xl font-bold">Introduction</h2>
<p className="mt-2 text-sm leading-relaxed text-zinc-600">
This section uses generous spacing for a primary document area.
</p>
</Section>
<Section variant="callout" spacing="md">
<h3 className="text-base font-semibold">Note</h3>
<p className="mt-1 text-sm leading-relaxed text-zinc-600">
Callout sections use a left accent border to draw attention to
important information.
</p>
</Section>
<Section variant="highlight" spacing="md">
<h3 className="text-base font-semibold">Highlight</h3>
<p className="mt-1 text-sm leading-relaxed text-zinc-600">
Highlighted sections add a muted background for emphasis.
</p>
</Section>
<Section variant="card" spacing="md">
<h3 className="text-base font-semibold">Details</h3>
<p className="mt-1 text-sm leading-relaxed text-zinc-600">
Card sections render with a border and padding, grouping related
content.
</p>
</Section>
</div>
);
}








