Welcome to Vanilla Breeze
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
A print button with optional toggle to disable VB print style optimizations.
The <print-page> component wraps window.print() in a progressive enhancement button with a printer icon. It auto-hides itself when printing and optionally lets users toggle VB’s print style optimizations on or off.
<print-page>Print this page</print-page>
By default the button shows both a printer icon and label text. Without JavaScript, the element renders as inert text. With JavaScript, it becomes a functional print button.
| Attribute | Type | Default | Description |
|---|---|---|---|
raw-toggle |
Boolean | — | If present, shows a checkbox labeled “Print without VB styles” |
label |
String | Element text or “Print this page” | Custom button label |
variant |
icon, label, icon-label |
icon |
Visual display mode. Use icon-label for a labeled button, label for text only. |
Control the visual display with the variant attribute.
<!-- Default: icon and text --><print-page>Print this page</print-page>
<!-- Icon only — for toolbars and page-tools --><print-page variant="icon"></print-page>
<!-- Text only — no icon --><print-page variant="label">Print</print-page>
Use variant="icon" when placing inside <page-tools> for a compact toolbar appearance.
<page-tools data-position="sticky"> <print-page variant="icon"></print-page> <share-wc variant="icon" size="s"></share-wc></page-tools>
When raw-toggle is present, the component adds a checkbox. If checked, it sets data-print-raw on the <html> element before opening the print dialog, which disables all VB print optimizations. The attribute is removed after printing.
<!-- With checkbox to disable VB print optimizations --><print-page raw-toggle>Print this page</print-page>
This is useful for users who want to see the page print exactly as it appears on screen — with theme colors, shadows, and layout intact.
Set the button text via label or as the element’s text content.
<print-page label="Save as PDF"></print-page>
Place the component wherever makes sense. It hides itself during printing automatically. Adding data-no-print is redundant but makes intent explicit.
<article> <h1>Quarterly Report</h1> <p>...</p> <footer> <print-page raw-toggle data-no-print>Print report</print-page> </footer></article>
Try the print buttons below.
<button> — fully keyboard accessible.<input type="checkbox"> inside a <label>.role="group" on itself when both button and toggle are present.