tween
ComponentsTemplatesShowcaseContact

Command Palette

Search for a command to run...

Getting Started
  • Introduction
  • Installation
  • StoryNew
Guides
  • Motion Principles
  • Scroll and Smooth Scroll
  • Performance and Accessibility
Scroll Animations
  • Sticky Cards Scroll
  • Rise Fan Cards Scroll
  • Rotate Stack Scroll
  • Doodle Lens ScrollNew
  • Slit Open Hero ScrollNew
  • Logo Mask Zoom ScrollNew
  • ASCII Dissolve ScrollNew
  • Lottie Flight ScrollNew
  • Inline Icon Text ScrollNew
  • Starfield ScrollNew
  • Name Swap ScrollNew
  • Spotlight Gallery HeroNew
  • Slit Rotate Hero ScrollNew
  • Stroke Cover ScrollNew
  • Stroke Rows ScrollNew
Text Animations
  • Text Skew Reveal
  • Block Text Reveal
Hover & Cursor
  • Image Trail Cursor
  • Cursor Depth Logo
  • Physics Tag Drop
  • Elastic Card ListNew
  • Magnetic Cards SpringNew
Sliders & Carousels
  • Wheel Fullscreen Carousel
  • Ripple Displacement Slider
  • Three.js Blend Slider
  • Stacked Deck Slider
  • Orbit Cylinder SliderNew
  • Fan Stack SliderNew
  • Exponential Strip SliderNew
  • Dual Column SliderNew
Galleries & Grids
  • Scroll Wave Gallery
Menus & Navigation
  • Shrink Page MenuNew
Preloaders & Intros
  • Floating Items RevealNew
  • Word Cycle RevealNew
  • Tile Grid LoaderNew
Page Transitions
  • Panel Assembly TransitionNew
3D & WebGL
  • Fractal Glass Hero
  • Fluid Cursor Canvas
  • Fluid Portrait Hero
  • Fluid Gradient Canvas
  • Inversion Lens HoverNew
UI Elements
  • Circular Widgets
  • Vinyl Cover
  • Image Explosion Footer
  • Accordion Image FramesNew

(Tween) — Motion registry

Animated components & full sites, one command away.

Product

  • Components
  • Templates
  • Installation
  • Guides
  • Blog
  • Contact

Categories

  • Scroll Animations
  • Text Animations
  • Hover & Cursor
  • Sliders & Carousels
  • Galleries & Grids
  • Menus & Navigation
  • Preloaders & Intros
  • Page Transitions
  • 3D & WebGL
  • UI Elements
TWEEN
ease: power2.inOut0.00s
© 2026 TweenBack to topBuilt by mohammad
  1. Docs/
  2. Components/
  3. Fan Stack Slider

Fan Stack Slider

PreviousNext

An infinite wheel- and touch-driven photo stack that fans out with stepped offset, rotation, scale, blur and dimming, then snaps to the nearest slide.

Open in
fan-stack-slider-demo
components/ui/fan-stack-slider-demo.tsx
import { FanStackSlider } from "@/registry/tween/fan-stack-slider"

export function FanStackSliderDemo() {
  return <FanStackSlider />
}

Installation

pnpm dlx shadcn@latest add https://tweenui.dev/r/fan-stack-slider.json

Usage

import { FanStackSlider } from "@/components/ui/fan-stack-slider"
<FanStackSlider
  images={[
    "https://images.unsplash.com/photo-1601894341243-22ea67386678?q=80&w=1500&h=1000&fit=crop&crop=faces,center&auto=format",
    "https://images.unsplash.com/photo-1587835526880-c3065417ee7d?q=80&w=1500&h=1000&fit=crop&crop=faces,center&auto=format",
    "https://images.unsplash.com/photo-1561460792-5fbec15c79da?q=80&w=1500&h=1000&fit=crop&crop=faces,center&auto=format",
  ]}
/>

How it works

  • A fixed pool of visibleSlidesLeft + visibleSlidesRight + 2 slides is recycled. Each slide's offset from the current position is wrapped, and its image is swapped as it wraps around, so the stack is infinite.
  • Every step away from the active slide adds offsetStep xPercent, rotationStep degrees, scaleStep shrink, blurStep px of blur and brightnessStep dimming.
  • Wheel and touch input (on the component only) move a target position; a GSAP ticker lerps toward it with smoothing.
  • After snapDelay ms of no input, the target snaps to the next slide if you moved past swapThreshold, otherwise back.
  • Z-index flips based on travel direction so the outgoing slide passes over the stack.
  • With prefers-reduced-motion: reduce, the stack is shown at rest.

Props

PropTypeDefaultDescription
imagesstring[]10 defaultsImage URLs cycled through the stack.
visibleSlidesRightnumber12Slides visible behind the active slide.
visibleSlidesLeftnumber2Slides visible after they pass.
offsetStepnumber12xPercent offset per step.
rotationStepnumber-7Rotation in degrees per step.
scaleStepnumber0.05Scale reduction per step.
blurStepnumber0.25Blur in px per step.
brightnessStepnumber0.1Brightness reduction per step.
minBrightnessnumber0.25Lowest brightness a slide can reach.
wheelSensitivitynumber0.005Slides moved per pixel of wheel delta.
touchSensitivitynumber0.0075Slides moved per pixel of touch drag.
maxWheelDeltanumber200Clamp for a single wheel event.
smoothingnumber0.075Lerp factor toward the target.
snapDelaynumber250ms of inactivity before snapping.
swapThresholdnumber0.5Fraction of a slide needed to advance on snap.
backgroundstring"#0b0b0a"Section and slide frame color.
classNamestring—Extra classes on the outer section.
Orbit Cylinder SliderExponential Strip Slider

On This Page

InstallationUsageHow it worksProps

Contribute

  • Report an issue
  • Request a feature
  • Edit this page