Skip to content

CSS Spinner Collection

Eight lightweight pure CSS loading spinners in a labelled grid, each with role="status" and screen reader text, no JavaScript.

Also known as: loading spinner, css loader animation, loading indicator, spinner animation

CSS Spinner Collection live demo

Open in new tab

Pure CSS code (HTML, CSS)

A collection of eight lightweight loading spinners written in pure CSS, with no JavaScript and no images. They are shown in a labelled dark grid so you can pick one and copy only the markup and rules you need for buttons, cards, page loaders or data tables.

How it works

The root section.sp-collection holds a heading and a ul.sp-grid of .sp-item tiles. Each tile contains one .sp-spinner element and a .sp-label caption. Every spinner is a square box sized by --sp-size, and a second class picks its style:

  1. .sp-ring: a border circle with one colored segment that rotates.
  2. .sp-dual: two arcs, the inner one drawn with ::after and turning in reverse.
  3. .sp-dots: three .sp-dot elements bouncing one after another.
  4. .sp-bars: four .sp-bar elements stretching like an equalizer.
  5. .sp-pulse: two expanding circles from ::before and ::after.
  6. .sp-orbit: a .sp-planet dot circling a core on a dashed track.
  7. .sp-square: a gradient tile flipping in 3D.
  8. .sp-fade: eight .sp-petal bars arranged in a circle that fade in sequence.

All animation timings are multiples of --sp-speed, and staggered delays use calc() with the same variable, so one value speeds up or slows down the whole set while keeping each spinner's rhythm. Only transform and opacity are animated, which keeps them smooth on low-end devices.

Customization

  • --sp-color on .sp-collection: the main spinner color, used by every style.
  • --sp-color-2: the secondary color for the inner dual ring, the middle dot, the orbit core and the gradients.
  • --sp-size: changes the size of all spinners, e.g. 24px for a spinner inside a button.
  • --sp-speed: base duration; 0.6s feels urgent, 1.5s feels calm.
  • --sp-track: color of the faint track behind .sp-ring and the orbit path.
  • --sp-bg, --sp-card and --sp-text: the panel, tile and label colors, for example a light theme.
  • Change the text inside .sp-sr to describe what is loading, such as "Loading comments".

Use cases

  • Buttons: a small spinner shows that a request is in progress
  • Cards and panels: a loading indicator fills the space while content arrives
  • Page loaders: choose one of eight spinners for a full-page waiting state
  • Data tables: copy only the markup and rules you need, with screen reader text built in

Accessibility

Every spinner has role="status", which is a polite live region, and contains a .sp-sr span with "Loading…". That text is hidden visually but read by screen readers, so the spinner is announced without extra ARIA. The visible .sp-label captions only name the style in this demo and can be removed. With prefers-reduced-motion: reduce the animations are not removed, because a frozen spinner looks like a broken page; instead --sp-speed becomes 3s, so the motion is three times slower and less distracting.

Usage notes

To use a single spinner elsewhere, copy the .sp-spinner element, the shared .sp-spinner and .sp-sr rules, its own rules and keyframes, and declare the custom properties on a parent or on the spinner itself. Remove the spinner or set hidden on it when loading finishes.

CSS Spinner Collection at a glance

Framework
Pure CSS
Code
HTML, CSS
JavaScript
Not needed, CSS only
Dependencies
None
Layout
Responsive, works on mobile, dark design
Category
Loaders & Spinners
License
Free for personal and commercial use

Questions about this template

Can I use the CSS Spinner Collection code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

There is nothing to install. Paste the HTML where the component should appear and add the CSS to your stylesheet. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. It is built with HTML and CSS only, so there is no JavaScript to load.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

No dependencies. Pure HTML, CSS and JavaScript.

CSS Spinner Collection – free Pure CSS loader & spinner template
CSS Spinner Collection · free Pure CSS loader & spinner template

More Loaders & Spinners

Pulse Ring Loader – free Pure CSS loader & spinner template

Pulse Ring Loader

Pure CSS loading animation with concentric rings expanding from a beating dot, in default, large and inline sizes with custom properties and reduced motion.

Bouncing Dots Loader – free Pure CSS loader & spinner template

Bouncing Dots Loader

Pure CSS three-dot loaders: bounce, pulse with rings, chat typing indicator and a button loading state, all driven by custom properties.

Button and Inline Loaders – free Tailwind CSS loader & spinner template

Button and Inline Loaders

Tailwind CSS loading states for buttons, inputs and inline text: ring and arc spinners, bouncing dots, a progress line and a deploy status pill.

Full-Page Loader – free Tailwind CSS loader & spinner template

Full-Page Loader

Tailwind CSS full-page loader overlay with a spinning gradient ring, progress bar and status messages that fades out once the page has loaded.