04.11 · Micro-Interactions

Loading Spinner

Six small shapes loop to show that something is loading. Best for short waits.

Watch it

It moves by itself. Pause it to look closely, or turn on slow motion to see each part of the movement.

Ring
Orbit
Arc
Bounce
Pulse
Square

Try it

Change a setting and see the difference as it moves.

Speed

Fast spinning can feel anxious.

Size

Small fits inside a button; large fills an empty area.

More optionsFewer options

Color

Pick a color that stands out from the page.

Copy the prompt

Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.

Add a loading spinner to [the place where people wait for something to load]. Use a small shape that keeps moving in a steady loop, such as a ring with one colored part turning around, dots circling or dots bouncing in turn, to show that work is going on when you cannot say how long it will take. Show it only for waits longer than about half a second, and tell screen readers that something is loading. If you know how far along the task is, use a progress bar instead. If the visitor has reduced motion turned on, fade it gently instead of spinning. Match the settings listed below.

Replace the words in brackets with your own element. Your settings are added at the end.

Free and open source. If this helped, a star on GitHub helps other people find it.

Star on GitHub

What it is

The full explanation is in README.md.

Good for

  • Network waits
  • Buttons while sending
  • Short waits

Avoid on

  • Known-length tasks
  • Very quick loads