Command Palette

Search for a command to run...

Docs
Tumble Deck Showcase

Tumble Deck Showcase

An endless 3D deck of website previews controlled by scroll, drag, click, and keyboard input.

Tumble Deck Showcase

A scroll-driven 3D stack of website screenshots. The front card tips forward and lands flat while the next card moves into position. The deck loops endlessly in both directions.

Installation

Install the GSAP dependency if it is not already present:

Usage

import TumbleDeckShowcase, { type TumbleCard } from "@/components/veltrixui/tumble-deck-showcase"
 
const cards: TumbleCard[] = [
  { src: "/images/site-one.webp", alt: "Site one preview" },
  { src: "/images/site-two.webp", alt: "Site two preview" },
  { src: "/images/site-three.webp", alt: "Site three preview" },
]
 
export function Showcase() {
  return <TumbleDeckShowcase cards={cards} height="100svh" />
}

Props

PropTypeDefaultDescription
cardsTumbleCard[]RequiredImages to show in the looping deck.
heightnumber | string"100svh"Any valid CSS height.
aspectnumber2.06Card width divided by card height.
scrollPerCardnumber240Scroll pixels needed to tip one card.
depthnumber5Number of upright cards visible behind the front card.
backgroundstringTheme backgroundScene background color.
classNamestring—Additional root classes.
styleReact.CSSProperties—Inline root styles.
ariaLabelstring"Website showcase"Accessible region label.

Interaction

  • Scroll vertically or horizontally to scrub through the deck.
  • Drag vertically to move between previews.
  • Click the scene or use the arrow keys, Space, or Enter to advance.
  • The deck wraps around after the final image.
  • Respects the operating system's reduced-motion preference.

The component uses your supplied image URLs. Keep image dimensions consistent for the smoothest visual result.