turretcss

Spinner


About

The .spinner class can be added to any element to add a ::before pseudo element that has a spin animation and border styles to emulate a loading indicator.

Example

HTML

<div class="spinner">...</div>

CSS

--spinner-width: 0.125rem;
--spinner-size: 1.75rem;
--spinner-speed: var(--speed-slow);
--spinner-background-color: color-mod(var(--black) alpha(10%));
--spinner-foreground-color: var(--white);