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

Alert

Alert box with info, success, warning, and error variants.

Takumi Forme
Rendering PDF…

Installation

$ pnpm dlx shadcn@latest add @angular-pdfcn/takumi/alert

Usage

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

import { PdfAlert } from "@/components/pdf/alert/alert";
import { PdfHeading } from "@/components/pdf/heading/heading";
import { PdfSection } from "@/components/pdf/section/section";
import { PdfText } from "@/components/pdf/text/text";
import { PdfcnThemeProvider } from "@/components/pdf/theme-provider";
import {
  TakumiDocument,
  TakumiPage,
} from "@/lib/pdf-primitives";

@Component({
  imports: [
    TakumiDocument,
    TakumiPage,
    PdfcnThemeProvider,
    PdfAlert,
    PdfHeading,
    PdfSection,
    PdfText,
  ],
  template: `
    <takumi-document>
      <takumi-page size="A4">
        <pdf-theme-provider>
          <pdf-section spacing="none">
            <pdf-heading [level]="1">Document Alerts</pdf-heading>
            <pdf-text
              >The PdfAlert component displays callout boxes with different
              severity levels.</pdf-text
            >
            <pdf-section>
              <pdf-alert variant="info" title="Information"
                >This document contains important information about your
                account.</pdf-alert
              >
              <pdf-alert variant="success" title="Success"
                >Your payment has been processed successfully.</pdf-alert
              >
              <pdf-alert variant="warning" title="Warning"
                >Please review the terms and conditions before
                proceeding.</pdf-alert
              >
              <pdf-alert variant="error" title="Error"
                >Missing required fields. Please complete all
                sections.</pdf-alert
              >
            </pdf-section>
          </pdf-section>
        </pdf-theme-provider>
      </takumi-page>
    </takumi-document>
  `,
})
export class AlertDemo {}

API Reference

PdfAlert

Input Type Default
variant 'info' | 'success' | 'warning' | 'error' 'info'
title string -
showIcon boolean true
showBorder boolean true

The alert body is projected content.