3D Cylinder Marquee
Words on a rotating cylinder, with the radius derived from the face count.
- Category
- Animations
- Added
- 2026-09-20
- Deps
- none
- Updated
- 2026-09-20
This is a viberdy Pro component
The live preview, the props panel and the write-up are open to everyone. The full source, the AI prompt and CLI install are part of Pro.
Props
"use client";
export function MarqueeCylinder3d({
words,
speed = 18,
tiltX = -12,
faceWidth = 118,
reverse = false,
}: {
words: string[];
speed?: number;
tiltX?: number;
faceWidth?: number;
/** Spin the other way. */
reverse?: boolean;
}) {
const n = words.length;
// ---------------------------------------------------------------
// Full source available with a viberdy Pro subscription.
// https://viberdy.dev/pricing
// ---------------------------------------------------------------
}About this animation
A CSS cylinder is a dozen lines and two geometry facts. The first is the radius, which is not a design choice but a consequence: for faces of a given width arranged evenly around a circle, the circumradius of the regular polygon they form is the face width divided by twice the tangent of pi over the face count. Hard-code a number instead and the faces overlap or leave gaps the moment the word list changes length — which is exactly why most versions of this only look correct with the author's original six items. The second is where the tilt goes. A CSS animation on `transform` replaces any transform declared on the same element, so writing the rotateX tilt alongside the spinning rotateY silently discards it; the tilt has to live on a parent. Both the parent and the spinner need `preserve-3d` or the faces flatten into the plane. Edge gradients finish it, dissolving faces at the sides rather than letting them clip against the container.
Curator’s note
Built for viberdy 2.1. Deriving the radius from the face count is the one line that makes this work at any number of words.
Pairs well with
Matched on shared tags and category — the entries most likely to be used alongside this one.
Ticker Tape Background
backgroundsOversized, near-invisible ticker rows scrolling behind the fold as ambient texture.
Velocity Marquee Rail
animationsA marquee that accelerates with scroll speed and flips direction when you scroll back.
Flip Reveal Tiles
animationsA tile grid that flips on a diagonal wavefront to resolve into one image.