printable docs

Printable

An media container that styles children HTML elements for print.

Published Last updated: 5.0.0 Change log Github NPM
Install Install
npm install @bolt/elements-printable
Dependencies @bolt/core-v3.x

printable

Basic Printable A Printable element can be used for any content you wish to be visible and styled in print mode. Important Notes: You must add the e-bolt-printable class to the <body> element. It will hide everything on the page in print mode. Then add the the e-bolt-printable__article class to the article container. This class will make the article visible in print mode. Additionally, print specific styles are set for many plain HTML elements. To see an example of this in action, please go to this Academy Topic Details Page (click “Open in new tab” to view it outside of Pattern Lab) and start the print process. Demo

This is an example of an element to be printed

Only the heading and this paragraph will be shown in print mode. Click “Open in new tab” to view it outside of Pattern Lab, then in the browser menu click “Print”.

Twig
Not available in Twig. Please use plain HTML.
HTML
<body class="e-bolt-printable">
  <article class="e-bolt-printable__article">
    <h2>This is an example of an article to be printed</h2>
    <p>Only the heading and this paragraph will be shown in print mode.</p>
  </article>
</body>