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

    • Blade tags
    • Style attributes
    • Decorator styles

Style attributes

Every tag marked Style in the tag reference accepts these attributes. The PHP methods with the same names take typed values instead, like width(mm(70)) or background('slate-50').

Lengths can be pt, mm, cm, in or px, or relative to the element: em for its font size and lh for its line height. Colours are Tailwind palette names like slate-500, or hex codes. Booleans can be written on their own (bold) or as true, 1, false or 0.

Box

AttributeExampleAccepts
width, height, basiswidth="70mm"a length, a percentage or auto
min-width, max-width, min-height, max-heightmax-width="80%"a length or a percentage
padding, margin, border-widthmargin="6pt 0 0 0"one to four lengths: top, right, bottom, left
border-color, backgroundbackground="slate-50"a colour
border-styleborder-style="dashed"solid, dashed
radiusradius="8pt"a length
opacityopacity="0.5"0 to 1

Flex

AttributeExampleAccepts
directiondirection="column"row, column
gapgap="8pt"a length
justifyjustify="space-between"start, end, center, space-between, space-around, space-evenly
align-items, align-selfalign-items="center"start, end, center, stretch
grow, shrinkgrow="1"a number, 0 or more
wrapwrapa boolean

Text

AttributeExampleAccepts
fontfont="Merriweather"a family name
font-sizefont-size="9pt"a length above 0
weightweight="600"an integer from 1 to 1000
bold, italic, underline, strikebolda boolean
colorcolor="slate-600"a colour
line-heightline-height="1.4"a multiple of the font size, above 0
letter-spacingletter-spacing="0.6pt"a length
text-aligntext-align="right"left, right, center, justify

Pagination

AttributeExampleAccepts
keep-togetherkeep-togethera boolean. Moves the block to the next page whole instead of splitting it.
keep-with-nextkeep-with-nexta boolean. Keeps the block on the same page as the next one.
break-before, break-afterbreak-beforea boolean. Starts a new page.
min-linesmin-lines="2"an integer, 1 or more. The minimum lines of a paragraph on each side of a page break.

Bookmarks

AttributeExampleAccepts
bookmarkbookmark="Summary"a title for the PDF's bookmarks panel. Headings get one automatically; :bookmark="false" removes it.
bookmark-levelbookmark-level="2"an integer, 1 or more. How deeply the bookmark is nested.
Edit this page on GitHub
Last Updated: 10/21/26, 1:31 PM
Prev
Blade tags
Next
Decorator styles