Skip to main content
Back to Components

Stack Spread

A scroll-driven scattering card stack animation with spring-physics pointer parallax and responsive touch layouts. Built with Motion.

Preview

Loading...

Installation

Install the component using the CLI.

$npx shadcn@latest add https://www.ankurz.me/r/stack-spread.json

Usage

Import the component:

import StackSpread from "@/components/ui/stack-spread"

Use it in your code:

<StackSpread
  scrollLength={350}
  bgColor="#ececeb"
  textColor="#141414"
  showScrollHint={true}
/>

Props

PropertyTypeDefaultDescription
scrollLengthnumber350Scatter scroll distance, in vh.
bgColorstring"#ececeb"Background color of the stage container.
clusterRotationbooleantrueFan the clustered stack or start flat.
stackScalenumber0.82Scale of cards while clustered before scatter.
cardRadiusnumber8Corner radius on each card in px (desktop).
textColorstring"#141414"Color of the centre headline and subtitle.
textFadeStartnumber0.3Scroll progress (0-1) where text starts fading in.
showScrollHintbooleantrueShow the scroll to spread hint at the bottom.