Docs/Text
primitives@pdfcn-vue/text

Text

Body text with theme-aware typography, color, and spacing.

Installation

Terminal

npx shadcn-vue@latest add @pdfcn-vue/text

Usage

Example

<Text variant="lg" weight="medium">Invoice total</Text>
<Text color="mutedForeground" variant="sm">Due in 14 days</Text>

Props

PropTypeDefaultDescription
variant'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl' | '3xl'body sizeTypography scale step from the active theme.
align'left' | 'center' | 'right' | 'justify''left'Text alignment.
colorstring—Theme color key (for example `primary`) or hex.
weight'normal' | 'medium' | 'semibold' | 'bold''normal'Font weight mapped through theme primitives.
italicbooleanfalseItalic style.
decoration'underline' | 'line-through' | 'none''none'Text decoration.
transform'uppercase' | 'lowercase' | 'capitalize'—Text transform.
noMarginbooleanfalseRemove the paragraph bottom margin.
styleStyle—Escape hatch Forme style object merged last.

Live preview

The gallery uses a shared document. Change its theme in the theme builder to compare tokens.

Text in a document
Rendered with Forme in your browser.
Browser render

Rendering the PDF…

Vue SFC → Uint8Array

Source files

Registry paths
Files installed under components/pdf.
  • forme/components/Text.vue

Edit the theme tokens

Try the theme builder