CSS
Public
CSS Loading Spinner
A small pure CSS loading spinner using border animation.
#css
#animation
#loader
#utility
CSS
.spinner {
width: 40px;
height: 40px;
border: 4px solid #e5e7eb;
border-top-color: #4f46e5;
border-radius: 50%;
animation: spin 0.75s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
Notes
Add aria-live or visible text when the loading state is important for users.