Presets

Orbit loader

Two small planets circling a faint track at different speeds and in opposite directions.

CSSTailwindReactGIFMP4
trigger: loop
00.000 / 1.600s
timing
style

npm i motion · the component uses motion/react

How it works

The orbit loader shows two small bodies circling: a glowing planet on the outer track and a smaller moon on an inner path, going the other way. A 1px circle at 20% opacity draws the outer track. The planets do not move along a path; instead each sits at the top edge of an invisible arm (a full-size box) and the arm itself rotates with the spin keyframe. Rotating a container to carry a child around its edge is the simplest way to fake orbital motion in CSS.

The outer arm runs at Duration on linear easing. The inner arm is inset 25% of Size and runs at 60% of Duration in reverse, so the moon laps the planet roughly every turn. The planet gets a box-shadow in its own color for the glow.

It fits space or science themes, playful onboarding screens and "connecting" states for networked features. Parameters: Size, Color, Inner color, Duration and Easing. Planet size is 14% of Size and the moon 9%, so at 32px they get very small; 64px and up looks best. Keep Easing linear; anything else makes the orbit look like it is being pushed.

The arms rotate with transform, and the box-shadow is static, so nothing repaints during the loop. The root is role="status" with aria-label="Loading". If you use it as a decorative illustration rather than a wait state, set aria-hidden="true" instead.

How does the planet move around the circle?

The planet is positioned at the top center of an arm element that covers the whole loader. The arm rotates 360 degrees around its center, carrying the planet with it, so the planet traces a circle along the track. The moon works the same way on a smaller arm inset by 25%.

Can I add a third planet?

Copy one of the arm elements in the exported code, give it a different inset so its orbit sits between the others, and pick its own duration. Durations that are not simple multiples of each other (1.6s, 1s, 2.3s) keep the system from realigning too often, which makes it look more natural.

Why is the inner orbit reversed?

Opposite directions make the two bodies pass each other, which creates a visible event every lap and keeps the loader lively without adding more motion. If you prefer a calmer, realistic solar system, remove animation-direction: reverse from the inner arm so both rotate the same way at different speeds.

relatedMore like this

all loaders →
01 Spinner loop
02 Dual ring loop
03 Bouncing dots loop
04 Typing indicator loop
05 Equalizer bars loop
06 Progress bar loop

Export

format
height

480p max · small watermark · 3 per day · remove limits