Free · MIT licence · No dependencies

Orbit Gallery Free React component

Photos ride a tilted ring that spins on its own. Images at the front grow and sharpen, images at the back shrink, blur and fade, and a drag flings the whole ring with momentum. A portfolio hero nobody scrolls past.

  • React
  • CSS
  • Images
  • Carousel
  • Drag
Orbit Gallery

Get the code

Install in one linenpx shadcn@latest add https://alphenex.com/r/orbit-gallery.json

Works with any React project through the shadcn CLI. Prefer to paste it yourself? Copy the two files below into components/alphenex/. No Tailwind or animation library needed.

import OrbitGallery from '@/components/alphenex/orbit-gallery';

<OrbitGallery images={[{ src: '/work-1.jpg', alt: 'Project one' }, /* ... */]} />

How the orbit gallery works

Every image sits on an ellipse. Its angle gives an x from the cosine and a y from the sine, squashed by the tilt so the circle reads as a ring seen from slightly above.

The same sine gives a depth value from 0 at the back to 1 at the front. Depth drives the scale, the opacity, a light blur and the stacking order, which is enough to fake real 3D without WebGL or CSS 3D transforms.

One animation loop adds a slow spin plus any momentum from dragging. Releasing a drag keeps the last speed and lets it decay, so the ring coasts to its normal pace.

Frequently asked questions

Eight to sixteen looks best. More images also work; raise the radius so they do not overlap too much.

Want motion like this on your website?

We design and build custom websites with motion, 3D and SEO built in. Websites from $500.

More free components

Explore our work