Papercut
Guide
Laravel
Reference
Examples
Changelog
GitHub
Guide
Laravel
Reference
Examples
Changelog
GitHub
  • Reference

    • Blade tags
    • Style attributes
    • Decorator styles

Blade tags

Tags marked Style accept every style attribute, plus style="name" for a named style. Using an attribute a tag doesn't support throws UnknownAttribute, with a suggestion if there's a close match.

Structure

TagOwn attributesNotes
<x-doc::document>title, author, subject, keywords, langThe root. Holds <x-doc::page> tags; content with no page gets an implicit one. No style.
<x-doc::page>size, orientation, margin, header-gap, footer-gap, template or template-data, template-page, template-passwordsize is a paper name or "<width> <height>"; orientation is portrait or landscape. template draws a page of a PDF behind the page and sizes the page from it, so it can't be used with size or orientation. Slots: header, footer, background, overlay. No style.
<x-doc::place>x, y, anchor, widthOnly in the overlay slot. x, y and width are lengths or percentages of the page; anchor is top-left (the default), top, top-right, left, center, right, bottom-left, bottom or bottom-right. No style.
<x-doc::page-break>noneStarts a new page.
<x-doc::page-number>format, align, sizeStyle. format uses {page} and {total}. No content.

Layout

TagOwn attributesNotes
<x-doc::view>alignStyle. A generic box.
<x-doc::row>alignStyle. Children side by side.
<x-doc::column>alignStyle. Children top to bottom.
<x-doc::spacer>sizeA fixed gap with size, a flexible one without. Accepts grow and nothing else.

On boxes, align is short for align-items.

Text

TagOwn attributesNotes
<x-doc::text>align, sizeStyle. Inline markup: <b>, <i>, <u>, <s>, <mark>, <span>, <a href>, <br>.
<x-doc::p>align, sizeStyle. The paragraph preset.
<x-doc::h1> to <x-doc::h4>align, sizeStyle. Heading presets.
<x-doc::markup>html or text, styles, blank-paragraphsConverts stored HTML or plain text. See Rich text.
<x-doc::link>hrefStyle. href is required.

On text tags, align is text-align and size is font-size.

Lists

TagOwn attributesNotes
<x-doc::ol>start, markerStyle. A numbered list of <x-doc::li>.
<x-doc::ul>markerStyle. A bulleted list of <x-doc::li>.
<x-doc::li>valueStyle. Holds any block content, nested lists included.

marker is decimal, lower-alpha, upper-alpha, lower-roman, upper-roman, disc, circle, square or none.

Tables

TagOwn attributesNotes
<x-doc::table>columns, repeat-headerStyle. An optional <x-doc::thead> first, then <x-doc::tr> rows.
<x-doc::thead>noneCells for one header row, or <x-doc::tr> rows for several.
<x-doc::tr>noneStyle. Holds <x-doc::td> and <x-doc::th>.
<x-doc::td>, <x-doc::th>colspan, alignStyle. th is a bold header cell.

Media and embedding

TagOwn attributesNotes
<x-doc::image>src or data, fitStyle. fit is contain, cover or fill. Relative src stays inside papercut.image_path.
<x-doc::pdf-page>src or data, page, passwordStyle. A page of an existing PDF, sized like an image. Relative src stays inside papercut.image_path. Left out of HTML exports.
<x-doc::svg>src or data, or SVG markup inside the tagStyle. Sized like an image. Relative src stays inside papercut.image_path.
<x-doc::qr-code>value, level, quiet-zone, shape, eyes, eye-color, gradient, gradient-typeStyle. level is L, M, Q or H. Square: size it with width. shape is square, rounded or dots (the last two raise level to at least Q); eyes is square, dot or pointy; gradient is two colors. Styling needs bacon/bacon-qr-code. No content.
<x-doc::node>nodeEmbeds a Node or Component built in PHP.

Decorators

TagOwn attributesNotes
<x-doc::card>titleStyle. title also works as a slot.
<x-doc::callout>type, titleStyle. type: note, tip, warning, danger, or a tone you define.
<x-doc::blockquote>citeStyle. cite also works as a slot.
<x-doc::section>title, number, ruleStyle. title also works as a slot.
<x-doc::field>label, placeholder, linesStyle. label also works as a slot. lines is a positive integer.
<x-doc::choices>type, emphasize-selectedStyle. type: checkbox or radio. Holds only <x-doc::choice>.
<x-doc::choice>selectedValid only inside <x-doc::choices>. No style.
<x-doc::key-value>label-widthStyle. A length or percentage. Holds only <x-doc::kv>.
<x-doc::kv>labelA label is required, as an attribute or a slot. No style.
<x-doc::badge>typeStyle. type: neutral, note, tip, warning, danger, or a tone you define.
Edit this page on GitHub
Last Updated: 10/21/26, 8:36 PM
Next
Style attributes