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

Badge

Compact status badge for labels and tags.

Takumi Forme
Rendering PDF…

Installation

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

Usage

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

import { PdfBadge } from "@/components/pdf/badge/badge";
import { PdfcnThemeProvider } from "@/components/pdf/theme-provider";
import {
  TakumiDocument,
  TakumiPage,
  TakumiView,
} from "@/lib/pdf-primitives";

@Component({
  imports: [
    TakumiDocument,
    TakumiPage,
    PdfcnThemeProvider,
    PdfBadge,
    TakumiView,
  ],
  template: `
    <takumi-document>
      <takumi-page [size]="{ height: 200, width: 595 }">
        <pdf-theme-provider>
          <takumi-view
            [style]="{
              display: 'flex',
              flexDirection: 'row',
              flexWrap: 'wrap',
              gap: 6,
              marginBottom: 12,
            }"
          >
            <pdf-badge label="Small" variant="default" size="sm" />
            <pdf-badge label="Medium" variant="default" size="md" />
            <pdf-badge label="Large" variant="default" size="lg" />
          </takumi-view>
        </pdf-theme-provider>
      </takumi-page>
    </takumi-document>
  `,
})
export class BadgeDemo {}

API Reference

PdfBadge

Input Type Default
label string -
variant 'default' | 'primary' | 'success' | 'warning' | 'destructive' | 'info' | 'outline' 'default'
size 'sm' | 'md' | 'lg' 'md'
background string -
color string -

The badge text is the label input or projected content.