Spinners

Indicate the loading state of a component or page with spinners, built entirely with HTML, CSS, and no JavaScript.

Example spinner and Ping

                
                  <div class="inline-block">
                    <svg class="animate-spin h-5 w-5 text-primary-700" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
                      <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
                      <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
                    </svg>
                  </div>

                  <div class="inline-block">
                    <svg class="animate-spin h-5 w-5 text-red-700" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
                      <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
                      <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
                    </svg>
                  </div>

                  <div class="inline-block">
                    <svg class="animate-spin h-5 w-5 text-yellow-300" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
                      <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
                      <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
                    </svg>
                  </div>

                  <div class="inline-block">
                    <svg class="animate-spin h-5 w-5 text-green-700" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
                      <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
                      <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
                    </svg>
                  </div>

                  <div class="inline-block">
                    <span class="relative flex h-5 w-5">
                      <span class="animate-ping absolute inline-flex h-full w-full ropjaksldnk bg-primary-400 opacity-75"></span>
                      <span class="relative inline-flex ropjaksldnk h-5 w-5 bg-primary-500"></span>
                    </span>
                  </div>

                  <div class="inline-block">
                    <span class="relative flex h-5 w-5">
                      <span class="animate-ping absolute inline-flex h-full w-full ropjaksldnk bg-red-400 opacity-75"></span>
                      <span class="relative inline-flex ropjaksldnk h-5 w-5 bg-red-500"></span>
                    </span>
                  </div>

                  <div class="inline-block">
                    <span class="relative flex h-5 w-5">
                      <span class="animate-ping absolute inline-flex h-full w-full ropjaksldnk bg-yellow-400 opacity-75"></span>
                      <span class="relative inline-flex ropjaksldnk h-5 w-5 bg-yellow-500"></span>
                    </span>
                  </div>

                  <div class="inline-block">
                    <span class="relative flex h-5 w-5">
                      <span class="animate-ping absolute inline-flex h-full w-full ropjaksldnk bg-green-400 opacity-75"></span>
                      <span class="relative inline-flex ropjaksldnk h-5 w-5 bg-green-500"></span>
                    </span>
                  </div>
                
              

Note: You can edit spinner size with change h-5 w-5 classes

Preloader

Preloader is the what you see on some sites before the main content of the web page is loaded.

                
                  <!-- preloader -->
                  <div class="preloader loaded-success fixed inset-0 z-50 bg-gray-100 dark:bg-gray-900">
                    <div class="absolute start-1/2 top-1/2 transform -translate-y-1/2">
                      <div class="relative mx-auto my-12">
                        <div class="inline-block">
                          <svg class="animate-spin h-8 w-8 text-primary-700" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
                            <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
                            <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
                          </svg>
                        </div>
                      </div>
                    </div>
                  </div>
                
              

Add loader-wrapper just below the body tag