Avara UI

Scroll Stack

A premium collection of scroll-driven 3D card stacking layouts engineered exclusively with GSAP's ScrollTrigger plugin. As users scroll down the page, feature cards stick to the viewport while the next card slides up to cover them, creating a simulated 3D deck with silky 60fps performance across both light and dark modes.
Five independent scroll-driven layouts share this page, each with its own block file. Scroll inside a preview box to drive its ScrollTrigger timeline.

Fan stack

Overlapping cards in a tilted diagonal cascade, each with a photo hanging off its edge. As the stack scrolls into view the cards are dealt out of one pile into place, scrubbed by the scrollbar. It is built from small primitives, so a card holds whatever your data has.

Fan stack

Three numbered steps dealt from a pile into a cascade as you scroll.

scrollerRef
points the scroll trigger at the box it scrolls in. Leave it out on a normal page and the window drives the deal.
tone
on a card picks its surface — muted, light or accent, all tinted from your primary colour. By default the cards step through them in order.
side
on FanStackThumb hangs the photo off the card's right, left or top edge in the cascade.
The cascade is a container query, not a breakpoint: under 768px of width the cards become a sticky stack instead — each one sticks near the top and the next slides over it, its header left peeking. Drag the preview narrower to see it. Under prefers-reduced-motion the cascade simply shows, without the deal.

Installation

New project? Follow the installation guide to set up Tailwind CSS, shadcn, the cn helper and lucide-react, register the @algorize-ui registry once, then copy your styles from the Themes page.

Two builds, same props and file — install one.

Install Fan Stack

npx shadcn@latest add @algorize-ui/fan-stack

components/custom/blocks/FanStackBlock.tsx is written into your project. Copy any snippet from a Usage tab above and it runs.

Install dependencies

Step 1 installs this for you. Run it yourself only if you are adding Fan Stack to an existing project by hand. The cn helper and lucide-react are not listed — the installation guide covers them once for every component.

gsap is an npm package.

npm install gsap

Simple stack

Card gap

cardGap{64}
is the pixel offset between stacked cards, which is what keeps the titles underneath readable.
color"#1e3a8a"
on a StackItem sets its unique background color (supports hex codes, CSS colors, or Tailwind classes).

Installation

Install Scroll Stack

npx shadcn@latest add @algorize-ui/scroll-stack

components/custom/blocks/ScrollStackBlock.tsx is written into your project. Copy any snippet from a Usage tab above and it runs.

Install dependencies

Nothing beyond the shared setup — Scroll Stack needs only the cn helper and lucide-react, which the installation guide already put in place.

Sticky stack

Sticky stack

A headed section where each card sticks and the next overlaps it.

contentType
on an item picks its body: list, image, split or custom.

Installation

Two builds, same props and file — install one.

Install Sticky Scroll Stack

npx shadcn@latest add @algorize-ui/sticky-scroll-stack

components/custom/blocks/StickyScrollStackBlock.tsx is written into your project. Copy any snippet from a Usage tab above and it runs.

Install dependencies

Step 1 installs this for you. Run it yourself only if you are adding Sticky Scroll Stack to an existing project by hand. The cn helper and lucide-react are not listed — the installation guide covers them once for every component.

gsap is an npm package.

npm install gsap

More examples

Stack geometry

scaleStep{0.08}
is how far each covered card recedes.
stackOffsetStep{28}
is the pixel offset that keeps earlier headers peeking out.

Split stack

Pinned right

A two-column layout: the right column pins while the left scrolls its deck past it.

stickySide"right"
pins the right-hand column so cards stack on the right.

Installation

Install Split Scroll Stack

npx shadcn@latest add @algorize-ui/split-scroll-stack

components/custom/blocks/SplitScrollStackBlock.tsx is written into your project. Copy any snippet from a Usage tab above and it runs.

Install dependencies

Nothing beyond the shared setup — Split Scroll Stack needs only the cn helper and lucide-react, which the installation guide already put in place.

More examples

Pinned left

FlipstickySide"left"
and the deck moves to the left side.
cardDepthScale
and cardOffset tune that deck's shrink and spacing.

Horizontal Scroll Stack

The section pins and vertical scroll is translated into horizontal travel.

items
become the cards on the rail, in order.

Installation

Install Horizontal Scroll Stack

npx shadcn@latest add @algorize-ui/horizontal-scroll-stack

components/custom/blocks/HorizontalScrollStackBlock.tsx is written into your project. Copy any snippet from a Usage tab above and it runs.

Install dependencies

Nothing beyond the shared setup — Horizontal Scroll Stack needs only the cn helper and lucide-react, which the installation guide already put in place.

More examples

Shorter Rail

items
slide continuously across the viewport without stacking.
HorizontalRail is its own item, so it installs on its own:

Install Horizontal Rail

npx shadcn@latest add @algorize-ui/horizontal-rail

components/custom/blocks/HorizontalRailBlock.tsx is written into your project. Copy any snippet from a Usage tab above and it runs.

Install dependencies

Nothing beyond the shared setup — Horizontal Rail needs only the cn helper and lucide-react, which the installation guide already put in place.

Features

Discover the key capabilities that make this component an excellent choice for modern, animated user interfaces.

Fluid Animations

Hardware-accelerated transitions that ensure smooth 60fps performance across devices.

Highly Customizable

Exposes intuitive props for tailoring colors, sizes, and animation speeds to fit your brand.

Responsive Design

Automatically adapts to mobile, tablet, and desktop viewports without horizontal scrolling issues.

Accessible

Built with semantic HTML and ARIA labels where necessary to support screen readers and keyboard navigation.

Best Practices & Guidelines

Animation Performance

Avoid placing too many heavy animated components on a single screen to prevent layout thrashing and maintain 60fps performance. Use intersection observers to pause off-screen animations.

State Management

When triggering animations via state changes, ensure you wrap state updates in startTransition or use lightweight stores to prevent React rendering bottlenecks during the animation tick.

Props Reference

Component / InterfacePropTypeDefaultDescription
FanStackchildrenReactNodeRequired
The FanStackCards, in order. Any number works; the cascade spreads them across the width.
FanStackscrollerRefRefObject<HTMLElement | null>window
The element that scrolls, when the stack sits inside a scroll container rather than the page.
FanStackscrubnumber0.6
Seconds the cards take to catch up with the scrollbar. 0 locks them to it.
FanStackstickyTopnumber16
Below 768px of width, the gap in px above the first stuck card. Raise it to clear a fixed header.
FanStackCardtone"muted" | "light" | "accent"
By position
The card's surface, tinted from --primary. Cards step through the three in order when left unset.
FanStackThumbside"right" | "left" | "top"
By position
Which edge the photo hangs off in the cascade. Below 768px of width it is a small photo in the card's top corner.
FanStackPointiconReactNode
Check mark
Replaces the check mark ahead of the point.
ScrollStackitemsStackItem[]Required
An array of feature card objects defining the sequential stack sequence.
StackItemcolorstringundefined
Custom background color for this specific card. Accepts hex color codes (e.g. #1e3a8a), CSS colors (rgb, hsl), or Tailwind utility classes.
ScrollStackdepthScalenumber0.05
Controls the scaling mathematics. A value of 0.05 means each background card shrinks by 5% as the next card stacks over it via GSAP.
ScrollStackcardGapnumber24
The vertical pixel distance applied to the sticky top offset of each subsequent card, creating a staggered folder/deck appearance at the top of the viewport.
ScrollStackscrollerstring | Element | nullwindow
Optional scrolling viewport target passed directly to GSAP's ScrollTrigger. Essential when rendering the stack inside custom overflow containers, modals, or preview boxes instead of the native window root.
ScrollStackclassNamestringundefined
Custom Tailwind CSS classes to apply to the outermost scrolling container wrapper.
StackItemidstringRequired
A unique identifier string required for safe React list rendering and GSAP key mapping.
StackItemtitlestringRequired
Primary headline text displayed prominently on the left or top side of the card.
StackItemdescriptionstringRequired
Detailed paragraph text explaining the feature, displayed beneath the headline.
StackItemiconReact.ElementTypeundefined
Optional Lucide React icon rendered inside an adaptive badge box above the title.
StackItemcontentReact.ReactNodeundefined
Optional custom JSX/UI payload (e.g., code blocks, interactive graphs, mockups) rendered on the right half of the card on desktop viewports.
StackItemcolorstring"bg-card border-border..."
Optional Tailwind background, text, and border classes applied to the card surface (e.g., "bg-indigo-600 text-white"). Omitting this allows the card to adapt automatically to light and dark modes.