• Settings
    • Locale
    • Change the locale of the datepicker, schedule and client side validation messages.

      Language
      English
      English
      English
      French
      German
      German
      German
      Italian
      Korean
      Spanish
      Catalan
      Dutch
      Portuguese
      Portuguese
      Arabic
      Arabic
      Bulgarian
      Bangla
      Bosnian
      Czech
      Greek
      Estonian
      Persian
      Finnish
      Danish
      Hindi
      Indonesian
      Icelandic
      Croatian
      Japanese
      Hungarian
      Hebrew
      Georgian
      Central Kurdish
      Khmer
      Kyrgyz
      Kazakh
      Lithuanian
      Latvian
      Malay
      Norwegian
      Polish
      Romanian
      Russian
      Slovak
      Slovenian
      Serbian
      Serbian
      Swedish
      Thai
      Turkish
      Ukrainian
      Uzbek
      Vietnamese
      Chinese
      Chinese
  • Resources
Theme
Theme
Preset primefaces.THEME
Apple Liquid Glass style: translucent overlays, menus and bars that blur the page behind them, capsule buttons.
Color scheme color-scheme
Input style p-input-filled
Density data-p-density
Direction primefaces.DIR
Colors
Primary --p-primary-base
Surface --p-surface-*
Shape and motion
Button shape --p-button-border-radius
Shadows --p-*-shadow
Animations --p-transition-duration
Ripple --p-ripple-opacity
Border radius --p-border-radius-*
Typography
Focus ring
Form field
CSS
Only the tokens that differ from the preset.

                        
                    

Panel

Panel is a grouping component with a header, content and footer. The examples show a toggleable and closable panel with the toggle and close Ajax events, a menu in the header defined with the options facet, custom header content and actions with the header and actions facets, and header icons that are replaced with CSS variables.

Panel Tag Documentation

Panel is a grouping component for other components, notable features are toggling, closing and built-in popup menu.

NameTypeRequiredDefaultDescription
id String false generated Unique identifier of the component in a namingContainer.
rendered boolean false true Boolean value to specify the rendering of the component, when set to false component will not be rendered.
binding UIComponent false generated An EL expression referring to a server side UIComponent instance in a backing bean.
ref String false generated ('pf_' + componentClientId) Name of the client side component, e.g. to access it via PF('name').
widgetVar String false Deprecated, use ref instead. Name of the client side component.
closable boolean false false Make panel closable.
closeSpeed int false 500 Speed of closing effect in milliseconds.
closeTitle String false Title label for closer element of closable panel.
collapsed boolean false false Renders a toggleable panel as collapsed.
footer String false Footer text.
header String false Header text.
menuTitle String false Title attribute for menu element on panel header.
multiViewState boolean false false Whether to keep component state across views.
renderEmptyFacets boolean false false Render facets even if their children are not rendered.
style String false Inline style of the component.
styleClass String false Style class of the component.
toggleOrientation String false vertical Defines the orientation of the toggle animation, valid values are "vertical" and "horizontal".
toggleSpeed int false 500 Speed of toggling in milliseconds.
toggleTitle String false Title attribute for toggler element of toggleable panel.
toggleable boolean false false Makes panel toggleable.
toggleableHeader boolean false false Defines if the panel is toggleable by clicking on the whole panel header.
visible boolean false true Renders panel as hidden.
Loading...
Regular
Header

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Toggleable
Header

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Custom Toolbar
Header

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Custom Icons
Custom Icons

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Usage


<style>
    /* the header icons are tokens: here for one panel, in :root for all */
    .custom-icons-panel {
        --p-panel-close-icon: var(--p-icon-trash);
        --p-panel-toggle-collapsed-icon: var(--p-icon-down);
        --p-panel-toggle-expanded-icon: var(--p-icon-up);
        --p-panel-menu-icon: var(--p-icon-list);
    }
</style>


<h:form>
    <p:growl id="msgs" showDetail="true" skipDetailIfEqualsSummary="true"/>

    <h5 class="mt-0">Regular</h5>
    <p:panel header="Header" footer="Movie Details">
        <p class="m-0">
            Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 
            quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum 
            dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
        </p>
    </p:panel>

    <h5>Toggleable</h5>
    <p:panel header="Header" toggleable="true" toggleableHeader="true" closable="true" toggleSpeed="500"
                closeSpeed="500" ref="panel">

        <p:ajax event="close" listener="#{panelView.onClose}" update="msgs"/>
        <p:ajax event="toggle" listener="#{panelView.onToggle}" update="msgs"/>

        <p class="m-0">
            Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 
            quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum 
            dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
        </p>

        <f:facet name="options">
            <p:menu>
                <p:submenu label="Settings">
                    <p:menuitem value="Toggle" url="#" icon="pi pi-clone" onclick="PF('panel').toggle()"/>
                    <p:menuitem value="Remove" url="#" icon="pi pi-times" onclick="PF('panel').close()"/>
                </p:submenu>
            </p:menu>
        </f:facet>
    </p:panel>

    <h5>Custom Toolbar</h5>
    <p:panel id="custom">
        <p class="m-0">
            Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 
            quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum 
            dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
        </p>

        <f:facet name="header">
            <i class="pi pi-ellipsis-v mr-2"></i>Header
        </f:facet>
        <f:facet name="actions">
            <p:commandLink styleClass="p-panel-titlebar-icon p-state-default">
                    <i class="pi pi-question"></i>
            </p:commandLink>
            <p:commandLink styleClass="p-panel-titlebar-icon p-state-default">
                <i class="pi pi-star"></i>
            </p:commandLink>
        </f:facet>
    </p:panel>

    <h5>Custom Icons</h5>
    <p:panel header="Custom Icons" toggleable="true" closable="true" styleClass="custom-icons-panel">

        <p:ajax event="close" listener="#{panelView.onClose}" update="msgs"/>
        <p:ajax event="toggle" listener="#{panelView.onToggle}" update="msgs"/>

        <p class="m-0">
            Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 
            quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum 
            dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
        </p>

        <f:facet name="options">
            <p:menu>
                <p:submenu label="Settings">
                    <p:menuitem value="Action 1" url="#" icon="pi pi-check"/>
                    <p:menuitem value="Action 2" url="#" icon="pi pi-refresh"/>
                </p:submenu>
            </p:menu>
        </f:facet>
    </p:panel>
</h:form>