For the complete documentation index, see llms.txt. Markdown variants are available by appending .md to any docs URL. An agent skill is available at /.well-known/agent-skills/site-skill.md.
0Sponsor

Form

Labeled form groups for PDF inputs.

Takumi Forme
Rendering PDF…

Installation

$ pnpm dlx shadcn@latest add @angular-pdfcn/forme/form

Usage

import { Component } from "@angular/core";

import { PdfForm } from "@/components/pdf/form/form";
import type { PdfFormGroup } from "@/components/pdf/form/form.types";
import {
  FormeDocument,
  FormePage,
} from "@/lib/pdf-primitives";

@Component({
  imports: [FormeDocument, FormePage, PdfForm],
  template: `
    <forme-document>
      <forme-page size="A4" [margin]="40">
        <pdf-form
          title="Job Application"
          subtitle="Please complete all fields clearly in block capitals."
          variant="underline"
          [groups]="groups"
        />
      </forme-page>
    </forme-document>
  `,
})
export class FormDemo {
  protected readonly groups: PdfFormGroup[] = [
    {
      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",
    },
  ];
}

Variants

<pdf-form
  variant="outlined"
  labelPosition="left"
  [groups]="[{ title: 'Contact', layout: 'two-column', fields }]"
/>

API Reference

PdfForm

Input Type Default
title string -
subtitle string -
groups PdfFormGroup[] -
variant 'underline' | 'box' | 'outlined' | 'ghost' 'underline'
labelPosition 'above' | 'left' 'above'
noWrap boolean false
style Style -

Groups support single, two-column, and three-column layouts.