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/forme/badge

Usage

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

import { PdfBadge } from "@/components/pdf/badge/badge";
import {
  FormeDocument,
  FormePage,
  FormeView,
} from "@/lib/pdf-primitives";

@Component({
  imports: [FormeDocument, FormePage, PdfBadge, FormeView],
  template: `
    <forme-document>
      <forme-page [size]="{ height: 200, width: 595 }" [margin]="40">
        <forme-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" />
        </forme-view>
      </forme-page>
    </forme-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.