# Card

Bordered content card with title and body.

> 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/card
```

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/card/card.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 { PdfCard } from "@/components/pdf/card/card";
import { PdfText } from "@/components/pdf/text/text";
import {
  FormeDocument,
  FormePage,
} from "@/lib/pdf-primitives";

@Component({
  imports: [FormeDocument, FormePage, PdfCard, PdfText],
  template: `
    <forme-document>
      <forme-page size="A4" [margin]="40">
        <pdf-card title="Project Summary" variant="default" padding="md">
          <pdf-text noMargin
            >This card groups related content with a title and body area. Use
            cards to visually separate sections of your PDF document.</pdf-text
          >
        </pdf-card>
      </forme-page>
    </forme-document>
  `,
})
export class CardDemo {}
```

## API Reference

### PdfCard

| Input     | Type                                 | Default     |
| --------- | ------------------------------------ | ----------- |
| `title`   | `string`                             | -           |
| `variant` | `'default' \| 'bordered' \| 'muted'` | `'default'` |
| `padding` | `'sm' \| 'md' \| 'lg'`               | `'md'`      |
| `wrap`    | `boolean`                            | `false`     |

The card body is projected content.