Components
Blocks
- Gift Certificate
- Event Agenda
- Event Ticket
- Invoice Classic
- Invoice Consultant
- Invoice Corporate
- Invoice Creative
- Invoice Minimal
- Invoice Modern
- Lesson Plan
- Medical Intake Form
- Meeting Minutes
- Packing Slip
- Press Release
- Report Financial
- Report Marketing
- Report Operations
- Report Security
- Shipping Label
- Work Order
Rendering PDF…
Installation
$ pnpm dlx shadcn@latest add @angular-pdfcn/takumi/alertUsage
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.