Getting Started
Scroll Animations
Text Animations
Hover & Cursor
Sliders & Carousels
Galleries & Grids
Menus & Navigation
Preloaders & Intros
Page Transitions
3D & WebGL
import { OrbitCylinderSlider } from "@/registry/tween/orbit-cylinder-slider"
export function OrbitCylinderSliderDemo() {
return <OrbitCylinderSlider />
}
import { OrbitCylinderSlider } from "@/components/ui/orbit-cylinder-slider"<OrbitCylinderSlider
slides={[
{ src: "/portraits/velvet-pause.jpg", title: "Velvet Pause" },
{ src: "/portraits/chalk-light.jpg", title: "Chalk Light", alt: "..." },
// ...
]}
/>rotateY(i * 360 / n) translateZ(radius), forming a cylinder inside a preserve-3d orbit.requestAnimationFrame loop lerps the orbit toward it.maxTilt degrees; leaving resets it.prefers-reduced-motion: reduce, the cylinder is shown at rest with the first slide.| Prop | Type | Default | Description |
|---|---|---|---|
slides | OrbitCylinderSlide[] | 10 portraits | Each slide is { src, title, alt? }. |
radius | number | 400 | Cylinder radius in px at full scale. |
wheelSpeed | number | 0.2 | Degrees of rotation per pixel of wheel. |
maxTilt | number | 30 | Maximum mouse tilt in degrees. |
smoothing | number | 0.05 | Lerp factor for rotation and tilt. |
background | string | "#eaeaea" | Section background color. |
className | string | — | Extra classes on the outer section. |