Efficiently configure the display of the component with PrimeFlex display utilities.
Resize to view.
Resize to hide.
Only visible when printed.
Not available for printing.
The display classes use the p-d-{value} format and p-d-{breakpoint}-{value} format for responsive design.
Value field can be one of the following options.
Breakpoints define how the display property should be defined depending on the screen size. Design is mobile first so smaller values can also apply to larger values e.g. md also applies to lg or xl if they are not explicitly defined.
<div class="p-d-inline">Displayed as inline.</div>
<div class="p-d-flex">Displayed as a flexbox container.</div>
<div class="p-d-block p-d-lg-inline">Inline for larger screens and block for others.</div>
<div class="p-d-md-none">Visible on a Small Screen</div>
<div class="p-d-none p-d-md-inline-flex">Hidden on a Small Screen</div>
<div class="p-d-none p-print-block">Only visible when printed.</div>
<div class="p-d-block p-print-none">Not available for printing.</div>
A custom build with different values can be obtained from PrimeFlex using the _variables.scss file.
<h5>Inline</h5>
<p:inputText styleClass="p-mr-2 p-d-inline" />
<p:inputText styleClass="p-d-inline" />
<h5>Block</h5>
<p:inputText styleClass="p-mb-2 p-d-block" />
<p:inputText styleClass="p-d-block" />
<h5>Visible on a Small Screen</h5>
<p>Resize to view.</p>
<p:commandButton type="button" icon="pi pi-bars" styleClass="p-d-md-none" />
<h5>Hidden on a Small Screen</h5>
<p>Resize to hide.</p>
<p:commandButton type="button" icon="pi pi-search" styleClass="ui-button-success p-d-none p-d-md-inline-flex" />
<h5>Visible to Print, Invisible for Screen</h5>
<p class="p-d-none p-print-block">Only visible when printed.</p>
<h5>Visible to Screen, Invisible for Print</h5>
<p class="p-d-block p-print-none">Not available for printing.</p>