Increase Diamond Loading Icon Size

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
alihasanash
Posts: 15
Joined: 30 Mar 2021, 16:17

17 Apr 2022, 10:17

I want to increase or enhance diamond loading icon at the bottom of the page.

I want this icon to be in the middle of the page and make the whole of page a bit dark while loading the page.
How do I make it and what css should I change?

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

19 Apr 2022, 02:07

Hi,

You can use p:ajaxStatus with p:dialog component for this feature. Exp;

Code: Select all

// template.xhtml
....
        <p:ajaxStatus onstart="PF('myDialog').show()" oncomplete="PF('myDialog').hide()" />
        <p:dialog widgetVar="myDialog" styleClass="layout-loading-dialog" modal="true" draggable="false" closable="false">
            <i class="pi pi-spin pi-spinner" style="font-size: 3rem"></i>
        </p:dialog>
...
Note: please update the default p:ajaxStatus in template.xhtml.

Custom style;

Code: Select all

     <style>
        body .layout-loading-dialog.ui-dialog .ui-dialog-titlebar {
            display: none;
        }

        body .layout-loading-dialog.ui-dialog .ui-dialog-content {
            padding: 1rem;
        }
   </style>
You can override my custom css according to your needs.

Best Regards,

alihasanash
Posts: 15
Joined: 30 Mar 2021, 16:17

25 Apr 2022, 08:16

Thank you! Problem solved.

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

27 Apr 2022, 12:59

Glad to hear, thanks a lot for the update!

Best Regards,

Post Reply

Return to “Diamond - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests