• 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

Skeleton

Skeleton is a placeholder to display instead of the actual content.

Skeleton Tag Documentation

Skeleton is a placeholder to display instead of the actual content.

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.
animation String false wave Animation type, valid options are "wave" and "none".
borderRadius String false Value from theme. Border radius of the element.
height String false 1rem Height of the element.
shape String false rectangle Shape of the element, options are "rectangle" and "circle".
size String false Size of the Circle or Square.
style String false Inline style of the component.
styleClass String false Style class of the component.
width String false 100% Width of the element.
Loading...
Tag DocumentationNew DocumentationNew Documentation
Rectangle
Rounded
Square
Circle
Card
List
DataTable
CodeNameCategoryQuantity

Usage


<style>
    .custom-skeleton {
        border: 1px solid var(--p-content-border-color);
        border-radius: 4px;
    }
    .custom-skeleton>ul {
        list-style: none;
    }
</style>

<div class="card">
    <div class="grid formgrid">
        <div class="field col-12 md:col-6">
            <h5>Rectangle</h5>
            <p:skeleton class="mb-2"/>
            <p:skeleton width="10rem" class="mb-2"/>
            <p:skeleton width="5rem" class="mb-2"/>
            <p:skeleton height="2rem" class="mb-2"/>
            <p:skeleton width="10rem" height="4rem"/>
        </div>
        <div class="field col-12 md:col-6">
            <h5>Rounded</h5>
            <p:skeleton class="mb-2" borderRadius="16px"/>
            <p:skeleton width="10rem" class="mb-2" borderRadius="16px"/>
            <p:skeleton width="5rem" borderRadius="16px" class="mb-2"/>
            <p:skeleton height="2rem" class="mb-2" borderRadius="16px"/>
            <p:skeleton width="10rem" height="4rem" borderRadius="16px"/>
        </div>
        <div class="field col-12 md:col-6">
            <h5 class="mt-3">Square</h5>
            <div class="flex align-items-end">
                <p:skeleton size="2rem" class="mr-2"/>
                <p:skeleton size="3rem" class="mr-2"/>
                <p:skeleton size="4rem" class="mr-2"/>
                <p:skeleton size="5rem"/>
            </div>
        </div>
        <div class="field col-12 md:col-6">
            <h5 class="mt-3">Circle</h5>
            <div class="flex align-items-end">
                <p:skeleton shape="circle" size="2rem" class="mr-2"/>
                <p:skeleton shape="circle" size="3rem" class="mr-2"/>
                <p:skeleton shape="circle" size="4rem" class="mr-2"/>
                <p:skeleton shape="circle" size="5rem"/>
            </div>
        </div>
    </div>
</div>

<div class="card">
    <div class="grid formgrid">
        <div class="field col-12 md:col-6 md:pr-6 pr-0">
            <h5>Card</h5>
            <div class="custom-skeleton p-4">
                <div class="flex mb-3">
                    <p:skeleton shape="circle" size="4rem" class="mr-2"/>
                    <div>
                        <p:skeleton width="10rem" class="mb-2"/>
                        <p:skeleton width="5rem" class="mb-2"/>
                        <p:skeleton height=".5rem"/>
                    </div>
                </div>
                <p:skeleton width="100%" height="150px"/>
                <div class="flex justify-content-between mt-3">
                    <p:skeleton width="4rem" height="2rem"/>
                    <p:skeleton width="4rem" height="2rem"/>
                </div>
            </div>
        </div>

        <div class="field col-12 md:col-6">
            <h5>List</h5>
            <div class="custom-skeleton p-4">
                <ul class="m-0 p-0">
                    <li class="mb-3">
                        <div class="flex">
                            <p:skeleton shape="circle" size="4rem" class="mr-2"/>
                            <div style="flex: 1">
                                <p:skeleton width="100%" class="mb-2"/>
                                <p:skeleton width="75%"/>
                            </div>
                        </div>
                    </li>
                    <li class="mb-3">
                        <div class="flex">
                            <p:skeleton shape="circle" size="4rem" class="mr-2"/>
                            <div style="flex: 1">
                                <p:skeleton width="100%" class="mb-2"/>
                                <p:skeleton width="75%"/>
                            </div>
                        </div>
                    </li>
                    <li class="mb-3">
                        <div class="flex">
                            <p:skeleton shape="circle" size="4rem" class="mr-2"/>
                            <div style="flex: 1">
                                <p:skeleton width="100%" class="mb-2"/>
                                <p:skeleton width="75%"/>
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="flex">
                            <p:skeleton shape="circle" size="4rem" class="mr-2"/>
                            <div style="flex: 1">
                                <p:skeleton width="100%" class="mb-2"/>
                                <p:skeleton width="75%"/>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>

        <h5>DataTable</h5>
        <p:dataTable var="product" value="#{skeletonView.products}">
            <p:column headerText="Code">
                <p:skeleton/>
            </p:column>
            <p:column headerText="Name">
                <p:skeleton/>
            </p:column>
            <p:column headerText="Category">
                <p:skeleton/>
            </p:column>
            <p:column headerText="Quantity">
                <p:skeleton/>
            </p:column>
        </p:dataTable>
    </div>
</div>

<div class="card" style="min-height: 150px">
    <p:outputPanel deferred="true" deferredMode="visible">
        <p:ajax event="load" listener="#{outputPanelView.loadData}"/>
        <f:facet name="loading">
            <p:skeleton width="200px" height="21px" class="mb-4"/>
            <p:skeleton width="100%" height="42px"/>
        </f:facet>
        <h5>#{outputPanelView.data.title}</h5>
        <p>#{outputPanelView.data.body}</p>
    </p:outputPanel>
</div>