# List

Ordered and unordered lists.

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

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/list/list.styles.ts`
- `components/pdf/list/list.ts`
- `components/pdf/list/list.types.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 { PdfList } from "@/components/pdf/list/list";
import type { ListItem } from "@/components/pdf/list/list.types";
import { PdfcnThemeProvider } from "@/components/pdf/theme-provider";
import {
  TakumiDocument,
  TakumiPage,
} from "@/lib/pdf-primitives";

@Component({
  imports: [TakumiDocument, TakumiPage, PdfcnThemeProvider, PdfList],
  template: `
    <takumi-document>
      <takumi-page size="A4">
        <pdf-theme-provider>
          <pdf-list variant="bullet" [items]="items" />
        </pdf-theme-provider>
      </takumi-page>
    </takumi-document>
  `,
})
export class ListDemo {
  protected readonly items: ListItem[] = [
    {
      description: "Match all components to the design specification.",
      text: "Design system alignment",
    },
    {
      description: "Build PDF-native components for both renderer bases.",
      text: "Component implementation",
    },
    {
      description: "Cover all variants and edge cases.",
      text: "Write unit tests",
    },
  ];
}
```

### Variants

```angular-html
<pdf-list variant="numbered" [items]="items" />
<pdf-list variant="checklist" [items]="checklistItems" gap="md" />
```

## API Reference

### PdfList

| Input     | Type                                                                                | Default    |
| --------- | ----------------------------------------------------------------------------------- | ---------- |
| `items`   | `ListItem[]`                                                                        | -          |
| `variant` | `'bullet' \| 'numbered' \| 'checklist' \| 'icon' \| 'multi-level' \| 'descriptive'` | `'bullet'` |
| `gap`     | `'xs' \| 'sm' \| 'md'`                                                              | `'sm'`     |
| `noWrap`  | `boolean`                                                                           | `false`    |
| `style`   | `Style`                                                                             | -          |