06.02 · 3D & Advanced

Scroll-Driven 3D Rotation

Scrolling turns a 3D cube from pose to pose. Best for product tours.

Scroll it

Scroll inside the box, or press Play and it scrolls for you.

Try it

Change a setting, then scroll again or press Play.

Turn amount

How far each pose turns the cube.

The cube glides to catch up instead of jumping.

Copy the prompt

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

Add a scroll-driven 3D rotation to [the product or object you want to show]. Pin the object in view while the visitor scrolls through a tall section, and turn the scroll position, from the top of the section to its end, into a series of poses: turned to one side, tilted forward, larger, then turned round to show its back. Blend smoothly between neighboring poses so scrolling back plays it in reverse, and when the settings include it, let the object glide to catch up instead of jumping with the scroll. If the visitor has reduced motion turned on, follow the scroll exactly, with no gliding. 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

  • Product tours
  • Device launches
  • Landing pages
  • Storytelling sections

Avoid on

  • Short pages
  • Forms and dashboards