# Divider

Horizontal rule to separate sections.

> For the complete documentation index, see [llms.txt](/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](/.well-known/agent-skills/site-skill.md).

## Installation

```bash
npx shadcn@latest add @angular-pdfcn/forme/divider
```

To install manually, add the dependencies:

```bash
npm install @formepdf/core @formepdf/shared
```

Then copy these files into your project and update the import paths to match your setup:

- `components/pdf/divider/divider.ts`
- `lib/resolve-color.ts`
- `components/pdf/theme-provider.ts`
- `lib/pdf-renderer.ts`
- `lib/pdf-primitives.ts`
- `lib/render.ts`
- `lib/pdf-themes/professional.ts`
- `lib/pdf-themes/primitives.ts`
- `types/pdf-themes.ts`
- `types/pdf-components.ts`

## Usage

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

import { PdfDivider } from "@/components/pdf/divider/divider";
import { PdfHeading } from "@/components/pdf/heading/heading";
import { PdfText } from "@/components/pdf/text/text";
import {
  FormeDocument,
  FormePage,
  FormeView,
} from "@/lib/pdf-primitives";

@Component({
  imports: [
    FormeDocument,
    FormePage,
    PdfDivider,
    PdfHeading,
    PdfText,
    FormeView,
  ],
  template: `
    <forme-document>
      <forme-page size="A4" [margin]="30">
        <forme-view>
          <pdf-heading [level]="2">Section 1</pdf-heading>
          <pdf-text>Content here.</pdf-text>
          <pdf-divider />
          <pdf-heading [level]="2">Section 2</pdf-heading>
          <pdf-text>More content.</pdf-text>
          <pdf-divider variant="dashed" />
          <pdf-heading [level]="2">Section 3</pdf-heading>
          <pdf-text>More content.</pdf-text>
          <pdf-divider variant="dotted" />
          <pdf-heading [level]="2">Section 4</pdf-heading>
          <pdf-text>More content.</pdf-text>
          <pdf-divider label="Section Divider" />
          <pdf-heading [level]="2">Section 5</pdf-heading>
          <pdf-text>More content.</pdf-text>
        </forme-view>
      </forme-page>
    </forme-document>
  `,
})
export class DividerDemo {}
```

## API Reference

### PdfDivider

| Input       | Type                              | Default   |
| ----------- | --------------------------------- | --------- |
| `spacing`   | `'none' \| 'sm' \| 'md' \| 'lg'`  | `'md'`    |
| `variant`   | `'solid' \| 'dashed' \| 'dotted'` | `'solid'` |
| `color`     | `string`                          | -         |
| `thickness` | `'thin' \| 'medium' \| 'thick'`   | `'thin'`  |
| `label`     | `string`                          | -         |
| `width`     | `string \| number`                | -         |