Account

Cards

Creative

Stack Card

The next card rises to meet you and the deck loops. Arrow keys and buttons do the same.

Install

Included with Creative: needs your API key. Initialize and log in once.

Terminal
npx @galactrex/ui add stack-card

Usage

Example
import { StackCard } from "@/components/galactrex/stack-card";

<StackCard><Quote /><Quote /><Quote /></StackCard>

Source

Installs to components/galactrex/stack-card.tsx, with the shared motion primitives beside it.

Source for this component comes with its plan. Install it with the command above, or open your licensed copy here.

See plans

Props

PropTypeDefaultDescription
childrenReactNode—One child per card.
thresholdnumber110Fling distance in px.
depthnumber2Cards behind.
onSwipe(index, direction) => void—Each card that leaves.
classNamestring—Extra classes for the outer element.

Variants

  • Testimonials. Quotes to flick through.

Accessibility

  • Arrow keys and labelled buttons; hidden cards are aria-hidden.

Motion and reduced motion

  • Drag with rotation, spring stacking, fling exit.
  • Reduced motion: fades, no drag.