Black Friday: 30% off Pro

Get 30% off

Updated

Stack Flow

Pro

Preview

Customize

Speed0.60/s
forward
Gap400px
Spacing9px
Card width208px
Ratio0.66
Rotation50°
Tilt30°
Rounding10px

Installation

Pro

Stack Flow is a Pro component

Sign in to see the source, or install it with a license key. The live preview and props above are free to explore.

Install with a key

  1. Add the Pro registry to components.json:
    components.json
    {
      "registries": {
        "@uibrik-pro": {
          "url": "https://uibrik.com/r/pro/{name}.json",
          "headers": { "Authorization": "Bearer ${UIBRIK_LICENSE}" }
        }
      }
    }
  2. Put your key in .env.local and add that file to .gitignore:
    .env.local
    UIBRIK_LICENSE=your-license-key
  3. Install it:
    Terminal
    npx shadcn@latest add @uibrik-pro/stack-flow

Usage

import { StackFlow } from "@/components/uibrik/stack-flow/stack-flow";​const cards = [  { src: "/registry/stack-flow/dolomites-church.webp", alt: "Church below jagged Dolomites peaks" },  { src: "/registry/stack-flow/sea-of-clouds.webp", alt: "Peaks above a sea of clouds at sunset" },  // …3 more];​<StackFlow  speed={0.6}  direction="forward"  gap={400}  spacing={9}  cardWidth={208}  ratio={0.66}  rotation={50}  tilt={30}  rounding={10}  cards={cards}  // count={0}/>

Where to use Stack Flow

  • Process landing pages

    A card leaving one stack, crossing a gap and landing on another shows work moving through a process.

  • Workflow product heroes

    An endless loop of cards explains automation without words.

  • Bento tiles

    Two stacks on a diagonal fit a looping visual inside a tile.

Props

StackFlow
speed
Type number
0.6
Cards that cross the gap every second. Pauses while the pointer is over the stacks.
direction
Type "forward" | "back"
"forward"
Which way the cards cross the gap.
gap
Type number
400
Length of the open gap between the two stacks.
spacing
Type number
9
Space between neighbouring cards inside a stack.
cardWidth
Type number
208
Card width.
ratio
Type number
0.66
Card height against its width.
rotation
Type number
50
How far the row turns away from you.
tilt
Type number
30
How far the row leans back, which sets how steeply it climbs.
rounding
Type number
10
Corner radius of a card.
cards
Type { src: string; alt: string }[]
5 sample cards
The cards, in order. They repeat to fill the row.
count
Type number
–
Cards in the row. Leave out to fit as many as the stage needs.
className
Type string
–
Classes for the wrapper.