06.19 · 3D & Advanced

3D Carousel

Cards stand in a ring that spins in 3D as you drag it. Best for image galleries.

Drag it

Drag the cards sideways and let go, use the arrows, or press Show me.

Try it

Change a setting, then try it again or press Show me.

Number of cards

More cards make a wider ring of smaller cards.

The ring leans back, so you look down on it a little.

It turns slowly on its own and waits while you drag.

Copy the prompt

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

Add a 3D carousel to [the cards or pictures you want to show]. Stand the cards in a ring: turn each one by an equal share of a full circle, push it out from the middle by the same distance, and give the container a 3D perspective. Dragging sideways turns the whole ring with the pointer or finger; on release it keeps a little speed, then settles with the nearest card facing front. Previous and next buttons and the arrow keys turn it one card at a time. Change only the ring's rotation so it stays smooth. When the settings include it, the ring turns slowly by itself. If the visitor has reduced motion turned on, jump from card to card without turning. 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

  • Image galleries
  • Product picks
  • Portfolios
  • Album covers

Avoid on

  • Long lists
  • Text-heavy cards