# 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/takumi/divider
```

To install manually, add the dependencies:

```bash
npm install takumi-pdf @takumi-rs/helpers
```

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 { PdfcnThemeProvider } from "@/components/pdf/theme-provider";
import {
  TakumiDocument,
  TakumiPage,
  TakumiView,
} from "@/lib/pdf-primitives";

@Component({
  imports: [
    TakumiDocument,
    TakumiPage,
    PdfcnThemeProvider,
    PdfDivider,
    PdfHeading,
    PdfText,
    TakumiView,
  ],
  template: `
    <takumi-document>
      <takumi-page size="A4">
        <pdf-theme-provider>
          <takumi-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>
          </takumi-view>
        </pdf-theme-provider>
      </takumi-page>
    </takumi-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`                | -         |