primitives
@pdfcn-vue/textText
Body text with theme-aware typography, color, and spacing.
Installation
Terminal
npx shadcn-vue@latest add @pdfcn-vue/textUsage
Example
<Text variant="lg" weight="medium">Invoice total</Text>
<Text color="mutedForeground" variant="sm">Due in 14 days</Text>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | 'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl' | '3xl' | body size | Typography scale step from the active theme. |
| align | 'left' | 'center' | 'right' | 'justify' | 'left' | Text alignment. |
| color | string | — | Theme color key (for example `primary`) or hex. |
| weight | 'normal' | 'medium' | 'semibold' | 'bold' | 'normal' | Font weight mapped through theme primitives. |
| italic | boolean | false | Italic style. |
| decoration | 'underline' | 'line-through' | 'none' | 'none' | Text decoration. |
| transform | 'uppercase' | 'lowercase' | 'capitalize' | — | Text transform. |
| noMargin | boolean | false | Remove the paragraph bottom margin. |
| style | Style | — | 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.
Source files
Need the full template?
See blocks for invoices and reports composed from these primitives.