Loader component

Loader Generator

Type
Appearance
48px
1x
4px
Colors
html
<div class="loader"></div>
css
.loader {
  width: 48px;
  height: 48px;
  border: 4px solid #e2e8f0;
  border-bottom-color: #3b82f6;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

@keyframes rotation {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

GET MORE FROM THIS RESOURCE

Explain what is happening while people wait

A loader indicates ongoing work but cannot explain the operation by itself. Pair it with useful text such as “Exporting your file”. Avoid a spinner when the interface is idle, and replace it with a success or error state when the operation finishes.

Use the generator to establish the appearance, then adapt the exported markup and styles to your application. A preview demonstrates the visual treatment; it does not certify your final interaction. Check the implementation with real content, a narrow screen, and keyboard input before publishing.

Try the component in the code editor →